I am compiling my ATL plugin for windows mail which is being blocked by Vista DEP.
As I am building the DLL in VC 6.0, (uses old ATL 3.1).
I read about the possible solutions, but I can't switch to VS 2005 or above, I have to use VC6.0 only.
So, I got to know that we can change ATL headers like atlbase.h and atlwin.h or some other relevant files. I tried making these changes in atlbase.h, I changed PAGE_READWRITE to PAGE_EXECUTE_READWRITE in each VirtualAlloc function call.
But still the built DLL plugin is being blocked by Vista DEP.
There are some good oppotunity in Freeborders, we are search some Sr.C++ Engineer to join us, if you are interested in this position, please move your mouse to send me your CV to firstname.lastname@example.org, maybe i can help you to get a good job!
Thank you for your attention, wish you a good luck.
1. VS builds your DLL and tries to register it.
2. Registration happens by running regsvr32.
3. Your DllMain() sees that the process name is not explore.exe
4. DllMain() returns FALSE (error)
5. VS reports the error.
So it's doing exactly what you told it to do. You'll need to special-case registration as well. Don't forget to correct explore.exe to explorer.exe. Although that check won't work in IE versions before 7, because a file browser might be explorer.exe or iexplore.exe, and you have no control over it.
I have a C# com object (.net framework 2.0) that I want to call from C++.
I tried to import the tlb and create the object using MyNamespace::IMyInterfacePtr pObj; but i got errors about not impelemting queryInterface, AddRef etc.
I found out that I should use CComObject (ref: http://support.microsoft.com/kb/181265[^]. So declaring the variable was a success using: CComObject<mynamespace::mycomclass xmlns:mynamespace="#unknown">* pObj;</mynamespace::mycomclass>
Now I am trying to create an instance by using: HRESULT hRes = (CComObject::CreateInstance(&pObj);
But I get the following error:
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(2395) : error C2504: 'MyConClass' : base class undefined<br />
see reference to class template instantiation 'ATL::CComObject;' being compiled
Interpreting your code, I think the problem is apair(int64a, 33). apair is an object, but you're using it as a function - that matches the error message ("Term does not evaluate to a function"). If you want to set apair's value, do it in the constructor.
I have developed COM add-in for microsoft word.I am handling events of microsoft word like DocumentOpen, DocumentBeforeSave. In Open / save events, I am getting the content of an active document. But I am getting only text or only image or only tables at a time.
How to retrieve byte array pointer to the word document entire content irrespective of data type (image, string, and table).
Are you running in debug mode or release mode - 'cause that looks like a null pointer that would be checked by an assertion in debug mode. The Access violation reading location 0x00000024 indicates attempting to reference a structure member through a null pointer.
Anyway - have you set a LIBID in your ATL _Module (or _AtlModule or whatever it's called). I think you might get an access violation at the point where you're getting one if you haven't. You'll have a NULL type holder pointer, I think.