We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,163 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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.

2
Contributors
3
Replies
15 Hours
Discussion Span
2 Years Ago
Last Updated
4
Views
chintan_1671
Light Poster
39 posts since Jun 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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
Achieved Level 70
Team Colleague
32,139 posts since Aug 2005
Reputation Points: 5,836
Solved Threads: 2,576
Skill Endorsements: 69

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
Skill Endorsements: 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
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0904 seconds using 2.71MB