954,480 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Register WIn32 COM DLL Error

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.

chintan_1671
Light Poster
39 posts since Jun 2010
Reputation Points: 10
Solved Threads: 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.

Ancient Dragon
Retired & Loving It
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

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

chintan_1671
Light Poster
39 posts since Jun 2010
Reputation Points: 10
Solved Threads: 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

chintan_1671
Light Poster
39 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: