[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

dll entry point not found

Posted on 2001-09-07
8
Medium Priority
?
824 Views
Last Modified: 2007-10-18
i am getting this error when i try registering a dll written in vc++.


the dll was loaded, but dllregisterserver entry point was not found.

dllregisterserver may not be exported, or a corrupt version of the dll may be in memory. Consider using PView to detect and remove it.


i have no clue what that means, any help?
0
Comment
Question by:augblay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 6

Expert Comment

by:Triskelion
ID: 6466118
Did you put __declspec(dllexport) in front of your exported functions?
OR
Did you put the names of the exported functions in the EXP file?

0
 
LVL 1

Author Comment

by:augblay
ID: 6466144
i am a vb programmer, never done vc++ programming, can i email you the file as an attachment the project is not big
0
 
LVL 6

Expert Comment

by:Triskelion
ID: 6466202
Yes.
Check my profile.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Accepted Solution

by:
Triskelion earned 800 total points
ID: 6466278
Add the names of all of your exported functions inside of your DEF file.
It should look like this:

; rs232dll.def : Declares the module parameters.

LIBRARY      RS232DLL.DLL

EXPORTS
     CheckConnection
     SetupParameters
     IOOperation
     GetHandle
     CloseComPort
     HowManyResends
     SafeMode
     SendBuffer
     SendWindowInfo
     SendFile
     ReceiveFile
     SendCommand


Then rebuild your app.

After that you can use any other app that can call a DLL to test it.  Example below.

Declare Function GetHandle Lib "c:\science\20179045\rs232\Release\rs232dll.dll" () As Integer
Sub test()
    MsgBox GetHandle
End Sub
0
 
LVL 1

Expert Comment

by:ua1zcl
ID: 6466434
Plese add to .def file the following:

EXPORTS
  DllMain=DllEntryPoint      
  DllEntryPoint=DllEntryPoint  

If no def file presenst - create it and add to project beside other .c or .cpp source files.


Be sure you have a DllEntryPoint() function in one of
source files:

 int __declspec(dllexport) WINAPI DllEntryPoint
( HINSTANCE hInst,ULONG ul_reason_being_called,LPVOID lpReserved)
{  
    switch (ul_reason_being_called)
    {
        case DLL_PROCESS_ATTACH:
         iProcAttaches++;
        break;
        case DLL_THREAD_ATTACH:
        break;
        case DLL_THREAD_DETACH:
        break;
        case DLL_PROCESS_DETACH:
        break;
    }
UNREFERENCED_PARAMETER(hInst);
UNREFERENCED_PARAMETER(lpReserved);
return 1;
}
-----------------------------------------
So, now we have any known entry point.
0
 
LVL 1

Author Comment

by:augblay
ID: 6466809
i am getting this error when i am compiling it, do you know what is going on, meanwhile i have tried to increase the point to 400 for your excellent help.

please take a look in the code i sent you and let me know what is going on.

Compiling resources...
Compiling...
StdAfx.cpp
Compiling...
rs232dll.cpp
d:\please burn for augustine\chameleon - source code for win32 and rs232.dll\rs232dll\rs232dll.cpp(598) : warning C4305: '=' : truncation from 'const int' to 'char'
d:\please burn for augustine\chameleon - source code for win32 and rs232.dll\rs232dll\rs232dll.cpp(598) : warning C4309: '=' : truncation of constant value
d:\please burn for augustine\chameleon - source code for win32 and rs232.dll\rs232dll\rs232dll.cpp(1157) : warning C4018: '<' : signed/unsigned mismatch
Linking...
   Creating library Debug/rs232dll.lib and object Debug/rs232dll.exp

rs232dll.dll - 0 error(s), 3 warning(s)
0
 
LVL 6

Expert Comment

by:Triskelion
ID: 6466879
Yup.  I put a simple cast in front of those.

if(bItsAResend)
   io_buffer[0]=(char)INVALID_VALUE;

and

while(t2-t1 < (DWORD)delay)
     t2= timeGetTime();
0
 
LVL 1

Author Comment

by:augblay
ID: 6469524
Thanks a lot, i was able to compile and build without any error, the def file definition was also very helpful, but i am still getting the initial  error when i try registering it.

the dll was loaded, but dllregisterserver entry point was not found.

dllregisterserver may not be exported, or a corrupt version of the dll may be in memory. Consider using
PView to detect and remove it.


What else can i do?
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question