Solved

Register Dll created with wizard

Posted on 2000-03-30
2
347 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

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…
  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 goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

775 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