Click here to Skip to main content
15,915,703 members
Home / Discussions / COM
   

COM

 
GeneralCOM+ Remote Transient Event Subscription Pin
d2hilst2-Aug-02 3:56
d2hilst2-Aug-02 3:56 
QuestionImplemented QueryStatus... but I get idl errors? Pin
Tommy Svensson2-Aug-02 0:23
Tommy Svensson2-Aug-02 0:23 
AnswerRe: Implemented QueryStatus... but I get idl errors? Pin
Vi22-Aug-02 1:22
Vi22-Aug-02 1:22 
GeneralCreating a Typelib Pin
Brigg Thorp1-Aug-02 7:13
Brigg Thorp1-Aug-02 7:13 
GeneralRe: Creating a Typelib Pin
Vi21-Aug-02 19:31
Vi21-Aug-02 19:31 
GeneralWeb Services Implementation Guide Pin
Stanford Powers31-Jul-02 18:36
sussStanford Powers31-Jul-02 18:36 
General! SPAM ! Pin
soptest1-Aug-02 7:01
soptest1-Aug-02 7:01 
QuestionNow why doesn't this COMPILE!?!?!? Pin
Tommy Svensson31-Jul-02 6:42
Tommy Svensson31-Jul-02 6:42 
Hi,

I've been staring at this problem for hours and hours... what is wrong?!
This is what I do:

...snip...

CComModule _Module;

BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Lex, CLex)
END_OBJECT_MAP()

/////////////////////////////////////////////////////////////////////////////
// DLL Entry Point

extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID /*lpReserved*/)
{
    if (dwReason == DLL_PROCESS_ATTACH)
    {
	TCHAR pszLoader[MAX_PATH];
	GetModuleFileName(NULL, pszLoader, MAX_PATH);
	_tcslwr(pszLoader);
	if (_tcsstr(pszLoader, _T("explorer.exe")))
	    return FALSE;

        _Module.Init(ObjectMap, hInstance, &LIBID_LEXBHOLib);
        DisableThreadLibraryCalls(hInstance);
    }
    else if (dwReason == DLL_PROCESS_DETACH)
        _Module.Term();
    return TRUE;    // ok
}

...snap...


I get this error:

---Configuration: LexBHO - Win32 Unicode Release MinDependency--------
Linking...
   Creating library ReleaseUMinDependency/LexBHO.lib and object ReleaseUMinDependency/LexBHO.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinDependency/LexBHO.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

LexBHO.dll - 2 error(s), 0 warning(s)


But when I comment these lines out...

/*
	TCHAR pszLoader[MAX_PATH];
	GetModuleFileName(NULL, pszLoader, MAX_PATH);
	_tcslwr(pszLoader);
	if (_tcsstr(pszLoader, _T("explorer.exe")))
	    return FALSE;
*/

...things are working just fine. What is wrong with _tcslwr? Because that's where the problems start...

Help is much appreciated,

/Tommy
AnswerRe: Now why doesn't this COMPILE!?!?!? Pin
soptest31-Jul-02 9:07
soptest31-Jul-02 9:07 
GeneralNeed a starting point Pin
yeeeooowww31-Jul-02 6:18
yeeeooowww31-Jul-02 6:18 
GeneralIDispatch:Invoke - Runtime Access Violation error when accessing DISPARARAM &dp Pin
tm31-Jul-02 5:34
tm31-Jul-02 5:34 
GeneralRe: IDispatch:Invoke - Runtime Access Violation error when accessing DISPARARAM &dp Pin
Lily1831-Jul-02 6:14
Lily1831-Jul-02 6:14 
GeneralRe: IDispatch:Invoke - Runtime Access Violation error when accessing DISPARARAM &dp Pin
tm31-Jul-02 7:35
tm31-Jul-02 7:35 
GeneralCreating a Microsoft Word plugin ! Pin
Maerlin31-Jul-02 5:00
Maerlin31-Jul-02 5:00 
GeneralRe: Creating a Microsoft Word plugin ! Pin
Anonymous31-Jul-02 8:27
Anonymous31-Jul-02 8:27 
QuestionHow to talk to IE Internet Options + misc? Pin
Tommy Svensson31-Jul-02 1:31
Tommy Svensson31-Jul-02 1:31 
QuestionHow can I define packed structure in IDL? Pin
magicast30-Jul-02 22:21
magicast30-Jul-02 22:21 
AnswerRe: How can I define packed structure in IDL? Pin
Mark Janveaux4-Aug-02 20:34
Mark Janveaux4-Aug-02 20:34 
GeneralOLESCRIPT_E_SYNTAX Pin
Roman Nurik30-Jul-02 18:07
Roman Nurik30-Jul-02 18:07 
GeneralATL Problems ??? Ask for help ! Pin
Leesen30-Jul-02 16:06
Leesen30-Jul-02 16:06 
GeneralRe: ATL Problems ??? Ask for help ! Pin
Vi230-Jul-02 20:27
Vi230-Jul-02 20:27 
GeneralRe: ATL Problems ??? Ask for help ! Pin
Leesen31-Jul-02 1:45
Leesen31-Jul-02 1:45 
GeneralRe: ATL Problems ??? Ask for help ! Pin
Vi231-Jul-02 2:48
Vi231-Jul-02 2:48 
GeneralRe: ATL Problems ??? Ask for help ! Pin
Leesen3-Aug-02 22:51
Leesen3-Aug-02 22:51 
GeneralRe: ATL Problems ??? Ask for help ! Pin
Philippe Mori6-Aug-02 13:20
Philippe Mori6-Aug-02 13:20 

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.