Solved

Register Dll created with wizard

Posted on 2000-03-30
2
336 Views
Last Modified: 2008-03-04
I create a Dll using Wizard (A dll that export same symbols). I succeed to call a function of that Dll from a C++ console application. I didnt register the Dll. I want to call a function of the Dll from VBP. for that i should register it. I tried to run RegServ32 with MyDll.dll but i get an error:
"MyDll.dll" was loaded, but the DllRegisterServer entry point was not found. DllRegisterServer may be exported, or a corrupt version of MyDll.dll may be in memory. Consider using PView to detect and remove it."
0
Comment
Question by:oshra
2 Comments
 
LVL 2

Accepted Solution

by:
arikka earned 10 total points
ID: 2668696
Don't use in Wizard WIN32 DLL as Project Type, instead use ATL COM Wizard
type. Next use Server Type as DLL.
Build process automaticly will create
DllRegisterServer exportable entry and register your Dll.

If you do not want to have your Dll as COM server, you do not need to register
regualr Dll at all. Just make sure that
function you want call are exportable
(or in DEF file, or something like that
 __declspec( dllexport ) int func())).

In order to call them from VB just use :

Declare Function func _
Lib "mydll.dll" ( _
    ByVal a As Integer, _
    ByRef b As Integer _
) As Integer




0
 

Author Comment

by:oshra
ID: 2668934
I chose to use Dll and not ATL Dll in purpose. it was a mistake to think that i should register that. i solved my problem by creating a DEF file.
Thanks anyway.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now