Click here to Skip to main content
16,014,952 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
toxcct18-Aug-08 21:32
toxcct18-Aug-08 21:32 
GeneralRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
rolfhorror19-Aug-08 2:57
rolfhorror19-Aug-08 2:57 
AnswerRe: vc++ 6 mfc, easiest way to pass variables between dlgs? Pin
ThatsAlok19-Aug-08 20:29
ThatsAlok19-Aug-08 20:29 
QuestionRegSvr32 exit codes [modified] Pin
sashoalm18-Aug-08 5:51
sashoalm18-Aug-08 5:51 
QuestionRe: RegSvr32 exit codes Pin
David Crow18-Aug-08 7:18
David Crow18-Aug-08 7:18 
AnswerRe: RegSvr32 exit codes Pin
sashoalm18-Aug-08 7:31
sashoalm18-Aug-08 7:31 
QuestionRe: RegSvr32 exit codes Pin
David Crow18-Aug-08 7:45
David Crow18-Aug-08 7:45 
AnswerRe: RegSvr32 exit codes Pin
sashoalm18-Aug-08 20:46
sashoalm18-Aug-08 20:46 
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?

/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry

STDAPI DllRegisterServer(void)
{
    // registers object, typelib and all interfaces in typelib
    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:

// ExplorerExt.cpp : Implementation of DLL Exports.


// Note: Proxy/Stub Information
//      To build a separate proxy/stub DLL, 
//      run nmake -f ExplorerExtps.mk in the project directory.

#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:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CExplorerExtApp)
	public:
    virtual BOOL InitInstance();
    virtual int ExitInstance();
	//}}AFX_VIRTUAL

	//{{AFX_MSG(CExplorerExtApp)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

BEGIN_MESSAGE_MAP(CExplorerExtApp, CWinApp)
	//{{AFX_MSG_MAP(CExplorerExtApp)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
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();
}

/////////////////////////////////////////////////////////////////////////////
// Used to determine whether the DLL can be unloaded by OLE

STDAPI DllCanUnloadNow(void)
{
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    return (AfxDllCanUnloadNow()==S_OK && _Module.GetLockCount()==0) ? S_OK : S_FALSE;
}

/////////////////////////////////////////////////////////////////////////////
// Returns a class factory to create an object of the requested type

STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
{
    return _Module.GetClassObject(rclsid, riid, ppv);
}

/////////////////////////////////////////////////////////////////////////////
// DllRegisterServer - Adds entries to the system registry

STDAPI DllRegisterServer(void)
{
    // registers object, typelib and all interfaces in typelib
    return _Module.RegisterServer(TRUE);
}

/////////////////////////////////////////////////////////////////////////////
// DllUnregisterServer - Removes entries from the system registry

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

AnswerRe: RegSvr32 exit codes Pin
Stephen Hewitt18-Aug-08 17:51
Stephen Hewitt18-Aug-08 17:51 
GeneralRe: RegSvr32 exit codes Pin
sashoalm18-Aug-08 21:23
sashoalm18-Aug-08 21:23 
GeneralRe: RegSvr32 exit codes Pin
Dan18-Aug-08 22:50
Dan18-Aug-08 22:50 
GeneralRe: RegSvr32 exit codes Pin
sashoalm19-Aug-08 0:27
sashoalm19-Aug-08 0:27 
QuestionGetWindowDC(NULL) -- How to draw to the entire screen permanently? Pin
Göktürk GEZER18-Aug-08 5:31
Göktürk GEZER18-Aug-08 5:31 
QuestionRe: GetWindowDC(NULL) -- How to draw to the entire screen permanently? Pin
David Crow18-Aug-08 7:20
David Crow18-Aug-08 7:20 
AnswerRe: GetWindowDC(NULL) -- How to draw to the entire screen permanently? Pin
Göktürk GEZER18-Aug-08 8:10
Göktürk GEZER18-Aug-08 8:10 
AnswerRe: GetWindowDC(NULL) -- How to draw to the entire screen permanently? Pin
Stephen Hewitt18-Aug-08 17:59
Stephen Hewitt18-Aug-08 17:59 
GeneralRe: GetWindowDC(NULL) -- How to draw to the entire screen permanently? Pin
Göktürk GEZER19-Aug-08 5:26
Göktürk GEZER19-Aug-08 5:26 
QuestionHow to sink event from unmanged c++ to c# Pin
Member 315708418-Aug-08 4:51
Member 315708418-Aug-08 4:51 
AnswerRe: How to sink event from unmanged c++ to c# Pin
Hamid_RT18-Aug-08 5:24
Hamid_RT18-Aug-08 5:24 
GeneralRe: How to sink event from unmanged c++ to c# Pin
Member 315708418-Aug-08 5:28
Member 315708418-Aug-08 5:28 
GeneralRe: How to sink event from unmanged c++ to c# Pin
sashoalm18-Aug-08 5:37
sashoalm18-Aug-08 5:37 
QuestionRe: How to sink event from unmanged c++ to c# Pin
Mark Salsbery18-Aug-08 8:06
Mark Salsbery18-Aug-08 8:06 
GeneralRe: How to sink event from unmanged c++ to c# Pin
led mike18-Aug-08 8:10
led mike18-Aug-08 8:10 
GeneralRe: How to sink event from unmanged c++ to c# Pin
Mark Salsbery18-Aug-08 8:11
Mark Salsbery18-Aug-08 8:11 
GeneralRe: How to sink event from unmanged c++ to c# Pin
led mike18-Aug-08 8:21
led mike18-Aug-08 8:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.