1,105,534 Community Members

Register WIn32 COM DLL Error

Member Avatar
chintan_1671
Light Poster
39 posts since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I have created a C++ Win32 Dll.
I have created a .def File which contains the names of the functions in Win32.Dll
As: 1Win32.cpp includes a class library file named gs.tlb
It has functions named sum, strupper

1win32.def as
LIBRARY "1WIN32"

EXPORTS
sum
strupper

When i try to register the DLL i am getting error
The module 1Win32.dll loaded but the entry-point DllRegisterServer was not found.

How to register the dll to be used at different places/environments ?
I am using COM components.

Help would be really appreciated.

Member Avatar
Ancient Dragon
Achieved Level 70
27,650 posts since Aug 2005
Reputation Points: 5,234 [?]
Q&As Helped to Solve: 3,038 [?]
Skill Endorsements: 115 [?]
Team Colleague
Featured
Sponsor
 
0
 

Not all DLLs have to be registered. Just because it uses COM doesn't mean it has to be registered. Just put it in one of the folders in the PATH environment variable.

Member Avatar
chintan_1671
Light Poster
39 posts since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Ita giving me same error.
External component thrown an error.

Member Avatar
chintan_1671
Light Poster
39 posts since Jun 2010
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I have different functions for shrinking the file, growing the file, checking the version, testng crc.
Example of shrinking function is above. Implementation is same which calls functions from my Class library.
I hope u got a bit idea about my application.

Let me know if can help me to create DLLRegisterServer function.

Thanks

Currently my DLL function is something like

extern "C" __declspec(dllexport)
int _stdcall Shrink(char *largeFile, char *smallFile, int version)
{
    //Initialize COM.
    HRESULT hr = CoInitialize(NULL);

    IShrinkGrowDPtr psShrinkGrowD(__uuidof(ShrinkGrowD));
    long sResult = 0;

    psShrinkGrowD->Shrink(_bstr_t(largeFile), _bstr_t(smallFile), version, &sResult);

    // Uninitialize COM.
    CoUninitialize();
    return sResult;
}

is anytihng wrong with this ? I am a bit new to Win32

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: