|
I've got a shell extension dll that can't be registered - regsvr32 fails with exit code 0x3 (this happens on a 64-bit Vista), but I can't understand what the exit code means. Does anyone know what might be the problem and what this exit code means?
And this problem doesn't happen in XP 32-bit (my development machine).
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
modified on Monday, August 18, 2008 1:31 PM
|
|
|
|
|
Do you have a DllRegisterServer() function?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Yes, it is a ATL/COM shell extension, with MFC support enabled. It was done by following this article from codeproject - http://www.codeproject.com/KB/shell/shellextguideindex.aspx[^]
I forgot to mention that the problem *doesn't* happen in XP 32-bit (my development machine).
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
sashoalm wrote: Yes...
And what does it return?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
DllRegisterServer is just boilerplate code put by AppWizard, and it returns _Module.RegisterServer(TRUE). Btw, I also have a *.rgs file. Could something be wrong there?
STDAPI DllRegisterServer(void)
{
return _Module.RegisterServer(TRUE);
}
Actually the entire file is boilerplate, I haven't changed a line of code there I think.
Here's the code:
#include "stdafx.h"
#include "resource.h"
#include <initguid.h>
#include "ExplorerExt.h"
#include "ExplorerExt_i.c"
#include "ExplExt.h"
CComModule _Module;
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_ExplExt, CExplExt)
END_OBJECT_MAP()
class CExplorerExtApp : public CWinApp
{
public:
public:
virtual BOOL InitInstance();
virtual int ExitInstance();
DECLARE_MESSAGE_MAP()
};
BEGIN_MESSAGE_MAP(CExplorerExtApp, CWinApp)
END_MESSAGE_MAP()
CExplorerExtApp theApp;
BOOL CExplorerExtApp::InitInstance()
{
_Module.Init(ObjectMap, m_hInstance, &LIBID_EXPLOREREXTLib);
return CWinApp::InitInstance();
}
int CExplorerExtApp::ExitInstance()
{
_Module.Term();
return CWinApp::ExitInstance();
}
STDAPI DllCanUnloadNow(void)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
return (AfxDllCanUnloadNow()==S_OK && _Module.GetLockCount()==0) ? S_OK : S_FALSE;
}
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
return _Module.GetClassObject(rclsid, riid, ppv);
}
STDAPI DllRegisterServer(void)
{
return _Module.RegisterServer(TRUE);
}
STDAPI DllUnregisterServer(void)
{
return _Module.UnregisterServer(TRUE);
}
</initguid.h>
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Perhaps some required runtime DLL is missing. Use Depends[^] (or some other tool that does something similar) to see if this is the case.
Steve
|
|
|
|
|
thanks for the advice, I checked it, and there was one warning, and two files had red icons to the left.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.<br />
<br />
c:\windows\system32\SHLWAPI.DLL<br />
c:\windows\system32\IEFRAME.DLL<br />
btw at first i had checked it with 32-bit version of depends, and it gave different results even though it managed to launch on the 64-bit Vista.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
|
Thanks, I fixed the problem
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hi everyone,
When i draw to the screen by desktop DC, it is removed when desktop window needs repainting. I know it's what it have to be but i need some way to make my drawings permanent. How can i make my code notified when desktop window is repainting. Thank you for suggestions...
|
|
|
|
|
Does responding to WM_SETTINGCHANGE help?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I tried it now, but it doesn't...
|
|
|
|
|
Drawing to a window and expecting the changes to "stick" goes against the Win32 drawing model: you have to respond to WM_PAINT messages to get to make the changes permanent. Responding to WM_PAINT can only occur withing the process that manages the desktop. A better approach would be to use window with the WS_EX_TRANSPARENT[^] extended style set or use Layered Windows[^].
Steve
|
|
|
|
|
It seems it's better than hooking stuff. I'll give a try. Thank you...
|
|
|
|
|
Hi friends
I need help.
I need to develop dll in c++ that firing events to c# application.
any idea?
cheers!
|
|
|
|
|
What events can you more explain?
|
|
|
|
|
any events, like counting and every time it mod by 20 Reaise an event.
|
|
|
|
|
May be use SendMessage/PostMessage?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
How is the C# app listening for these "events"?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Probably with a couple tin cans and a string.
led mike
|
|
|
|
|
You are FAST!
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: You are FAST!
Of course! How many lines of code you can write in a day is the most important attribute of a developer!
Wow, I haven't cracked myself up for a long time!
led mike
|
|
|
|
|
Thanks guy
I have found http://www.codeguru.com/csharp/.net/net_general/patterns/article.php/c8381
|
|
|
|
|
|
Hello,
I have created a dialog using Visual C++ 2005. On the dialog are 2 group boxes and 2 ActiveX controls. How do I change the tab ordering of these objects? I have found the Layout toolbar, which contains the Tab Order button, but I don't know how to enable this button. Any help is appreciated.
Regards,
Mike
|
|
|
|