Hello - I wrote an application to read mag stripe data from a card, parse it and display it's contents. Now I'm attempting to create a DLL out of that logic. I have trimmed down the program to eliminate all those modules, functions, subs etc., that won't be necessary in the DLL. What following is a brief synopsis of the code I currently have.


(contains KeyUp and KeyPress functions to process each character read. Also contains AfterCheck which is the response to an event indicating that the last character has been read. It is shown here:

Sub AfterCheck()
cmdDecode 'function in frmMain that parses all the inputted data
'and places it in the Global string IDData
Unload Me
End Sub

I have a .bas module called MainForm.bas which contains the DLL function name to be called by an outside program:

Global IDData As String
Dim ShowForm as New CShowForm
Public Function ID() As String
ID = IDData
End Function

Finally, I have the class module CShowForm.cls:

Public Function CShowForm()
frmMain.Show vbModal
End Function

That's basically to total amount of code. When I initiate the package and deployment wizard, I get the following error message:

In order to proceed, the wizard requires the executable file 'identifier.dll' for this project (THIS IS THE FILE I'M TRYING TO CREATE IN THE FIRST PLACE!). Click browse to find the file or compile to compile the project.

I select COMPILE and I get the following error:

Unexpected error number 800004005 has occurred. Automation error. Unspecified error.

Anyone have any ideas?

Thanks, George

10 Years
Discussion Span
Last Post by Comatose

Thanks for your help but I've solved the problem. It seems if you select "Make *.dll" under "File" in the VB IDE, it creates the DLL. All that is then necessary is to register the DLL with the calling routine by checking its box under "References" under "Project". I now have the DLL working properly. Plus, I'm not using a Declare statement which none of my six VB6 books makes any mention of and two of those are Microsoft VB6 books!!

Thanks again for your help. If you would like to see how the DLL and the caller work, I'll be happy to post the code.

Let me know.

Thanks, George


Right on. There are two types of .dll's. A "Real" dll, which has an entry point, and usually doesn't have any dependencies... and an ActiveX Dll. The declare statement is used to reference a function that is in a "Real" DLL, while going to "project/references" and adding a references to a DLL works only for ActiveX Dll's. So, to my knowledge, you actually can't use the declare statement on an ActiveX dll.....

Since you found the solution, however, I'm going to go ahead and mark this thread as solved.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.