|
U can call CoCreateinstance in the event handler but it is better u create the component some where else say add an Init function and within this u create it and use in the thread.
Sudeesh
|
|
|
|
|
|
The information u given is too abstract. provide more clarity on ur problem or place some piece of code for reference. becaz we cant find out the root cause without code samples.
Kamaraj[in]
|
|
|
|
|
When you say 'event processing', do you mean in a COM sink interface, or normal message handling?
What HRESULT does CoCreateInstance return?
Can you write a minimal COM client that calls CoInitialize(), and successfully CoCreateInstance the codec, then release it and call CoUninitialize()?
Steve S
Developer for hire
|
|
|
|
|
i am working with Active-x test container in that i have add control through edit,now i am able to get connected with server with invoke function>My Q is :
1.if i want to save my userid and password in that for future use is that possible.
2. when i get connected to server it is giving me a "session id" and each time it will b new one
so if i want to use that session id for further procedure like "request Price" etc without
user interface how it can b done.
3.Is it possible to invoke more then 1 or 2 function from test container.
any suggestion will b helpful to me.
Thanks
|
|
|
|
|
I need help for following.
I want to list of URLs to which User visits using any browser. I wrote Browser Helper Object using MSDN code. This helps for Internet Explorer (and Windows' Explorer also) only.
How can I do same for NetScape/FireFox (other browsers)?
Is there any universal code useful for all browsers?
Can it be done using JavaScript or any other script?
Can any one guide please?
First deserve then desire. Let be deserved first.
|
|
|
|
|
I'm trying to make Outlook addin that will add one button to outlook context menu---
(VB.net / C# .net (NO C++ .net))
first,
ActiveExplorerCBars = applicationObject.ActiveExplorer.CommandBars
then
cmdbar = ActiveExplorerCBars.Item("Context Menu") 'cmdbar is commandbar object "^getting error here"
control = cmdbar.Controls.Add(MsoControlType.msoControlButton)
With control
.Caption = "kedar"
.visible = true
..... other props
End With
but i'm gettin an error that the parameter "Context Menu" is incorrect @ cmdbar = Active......
"i have seen code working in vb but not in vb.net so keep that in mind and reply for vb.net"
i've refered -- http://www.outlookcode.com/codedetail.aspx?id=526
http://www.outlookcode.com/codedetail.aspx?id=314 ?
and similar codes but they'r not of any use to me,.....
I think "Context Menu" is not a valid parameter. But accordg to other resources i've cometo know that outlook has that Named menu.
I'd like if anyone can post a code to add the button to context menu.
thnx in advance
"You can do any thing you set to your mind" - theGhost_k8
|
|
|
|
|
HAI,
I want to know whether its possible to access a substorage directly from the root storage.
For eg.
LPSTORAGE pStorage;//Main storage
LPSTORAGE pSubStorage;//Substorage
//StgOpenstorage(...);
hr = pStorage->OpenStorage(L"abc\\13\\456",........., (&pSubStorage));
Thank you
Beginner
|
|
|
|
|
that OCX is developed by VB6.
i can import it into CB6 through 'import ActiveX control'
but the .cpp file is empty. that mean its not included any class declear.
how can i use a VB-OCX normaly in cb6?????????????????????????
|
|
|
|
|
If you haven't change anything the control should end up in ActiveX-palette. Use it as you would use a normal VCL.
|
|
|
|
|
Hi there,
I've been developing a virtual web-cam DirectShow filter. I'd like to load a video file and transmit
it as if it comes from a WebCam.
At first I used the ISampleGrabber interface and tried to pass on the buffers I received from it.
Unfortunately, I had some wierd problems that the window that was supposed to receive the bitmaps
sometimes didn't get WM_PAINT messages fast enough and only once in a while. In other times it seemed
to be okay.
However, I decided to try something else: I built a filter graph and removed the Video Renderer filter. Then I saved the output pin to the Video Renderer filter (before removing it) and delegated
the IPin functions to that pin.
The problem is that when I use GraphEdit to connect a renderer to my filter, after the connection
both filters disappear from the filter graph. I know it has something to do with the connection of
the pins.
Is it possible to connect two pins from different filter graphs?
Is there maybe another way to do it?
I'd immensely appreciate any help!
Thanks.
|
|
|
|
|
I need Help on NetMeeting 3 SDK. If you can help me Please reply.
Thank You
KIRAN PINJARLA
|
|
|
|
|
Hi all,
I know how to get Active controls on control tool box in VC++ 6.0. But now i want to use them in .net version(Select Project | Add To Project | Components and Controls from the Visual C++
menu.), but I couldn'd a way to add them . Can any one of you help me in this .
Thanking you.
Sheshi
|
|
|
|
|
Dear Gurus,
You may not be aware that I have lost my job as our company has given us lay off.
I am really expecting a job in MFC, VC++.
I have given 2-3 technical interviews but it has made clear that interviews need special attention and preparation ,
I would be highly thankful , if someone provides me the compilation of interview questions on VC++, MFC, C++, ATL COM, Threading. If with answers then it will be a faster preparation for me. (Sorry being lazy here, but situation is a bit tedious with me right now).
ANy links also will help a lot.
If you want to send me few things, then email address is
rpathak03011978@yahoo.com
Looking forward some help from Codeproject.
Thanks ,
pathak
|
|
|
|
|
Hi ..
if u r preparing for interview than first u have to be very good in basic concepts of C++.
Like whats the difference between polymorphism and inheritance.
What is Virtual function.
Why we dont have virtual constructors, and why we have virtual destructors.
and Reg VC++ , MFC..
what is Doc/View arch.
diff. between common DLL's abd MFC DLL's
what is SDK.
what is Inline function.
Message Maps--??
Tell about WindProc()
basic properties of controls(edit, button..)
(ex. whats the diff between check box and radio button)
diff between Modal() and Modaless()..
how u retrieve text in a edit box without using member variables.
..
these r some questions which I faced in Interviews..
but better go through some FAQ's..
all the best..
Sheshidar
|
|
|
|
|
I encountered one access denied problem with the DCOM in Windows XP Sp2.
I have two COM servers. One say, X is service and another say, Y is an EXE.
I wrote one client application say, Client for Invoke X.
The Client will invoke the Service X (which are running in the same machine).It work successfuly.
The Service X will invoke the COM EXE,which is running in another machine.It will not work.
shibu george
|
|
|
|
|
check the firewall settings.
hello
|
|
|
|
|
Hi,
I have disabled the Firewall. Set the define the DCOM Remote Access and Remote Launch permissions.But the issue is still the same.
Thanks
Shibu George
Shibu George
|
|
|
|
|
What do you get in the event log on either machine when it fails?
(and you did remember to register any proxy/stub DLL's, didn't you...)
|
|
|
|
|
Hello all,
I have an Activex Control in vc++ 6.0.It is a player plays cam files.
I have designed in the way that everytime the Activex control opens ,cam file will be downloaded from the server(Download Dialog) and after downloading the download dialog is closed automatically using OnThreadFinished.
LRESULT CHttpDownloadDlg::OnThreadFinished(WPARAM wParam, LPARAM /*lParam*/)
{
m_bSafeToClose = TRUE;
m_ctrlAnimate.Stop();
if (m_bAbort)
EndDialog(IDCANCEL);
else if (wParam)
{
AfxMessageBox(m_sError);
EndDialog(IDCANCEL);
}
else
EndDialog(IDOK);
return 0L;
}
OnThreadFinished is for closing the dialog after the cam file downloads
fully.
1.Is ther any method to close the dialog while downloading the file.
Help me please and give me ur suggestions.
thanks in advance
Sunita
|
|
|
|
|
hi ,
what is the meaning of #pragma pack ?
From MSDN I came to know that it specifies the packing alignment for structure and union members .
But what is meant by packing alignment ?
Can you please tell me.
Thanks in advance
|
|
|
|
|
If you declare a struct with
char dummy;
short x;
long y;
members, the "optimal" size would be 1 + 2 + 4 (assume x86 for the moment).
However, this would be with alignment of 1. This says what byte boundary you use for packing. With an alignment of 2, each member begins on the next available 2 byte boundary, so the single char would be followed by an unnamed pad byte, the short would already be aligned correctly, as would the long.
Similarly with 4 byte, the char is followed by 3 unnamed pad bytes, the short by another two, and the long would be OK as is.
I can almost hear you asking "Why would I want to waste memory like that?"
[fx: pause for reader to actually ask...]
It's all to do with the way the processor accesses memory, and for some CPUs, like the SPARC, trying to access a packed (1) long would cause an exception.
The important thing is to consistently use the same alignment for all in memory versions of a structure. For instance, if you build a DLL with a function that takes a structure, the declaration of that structure should really include
#pragma pack(push)
#pragma pack(n)
struct {
....
};
#pragma pack(pop)
so that irrespective of the compile time options elsewhere, it has the packing n (where n is a power of 2). Without this, you might build the DLL with pack(2), for instance, and a client might be built with pack(1). This would misalign the data, and might even result in an access violation when you call the DLL function.
Does that help?
Steve S
Developer for hire
|
|
|
|
|
Thank you very much for your reply
|
|
|
|
|
Hi.
I'm developing MFC Activex library, which deals with data from MS Access DB. I need to make function like
short GetTagStruct(short nTag, VARIANT *arrayTagStruct) - .odl file in vc6++
I want to call this interface function in VB.
Structure can be for example:
<br />
Public Type TagStruct<br />
sTagName As String<br />
x As Single<br />
y As Single<br />
sObjName As String<br />
sDispPath As String<br />
sDispName As String<br />
End Type<br />
I know how to handle BSTR array in Variant, but I don't know what type I should select for safearray of user defined structure. For BSTR it is VT_ARRAY | VT_BSTR.
Can you give me example of using safearray of user defined structure stored variant ?
Thanx.
rudo
|
|
|
|
|
The Variant type used for this VT_ARRAY | VT_UI1 means a SafeArray of Unsigned Bytes. Which further means that this is simple binary data which you are storing in a variant.
"Some people believe football is a matter of life and death.
I'm very disappointed with that attitude.
I can assure you it is much, much more important than that. -- Bill Shankly"
|
|
|
|