Using VB 2005

  • Thread starter Thread starter Mavrik
  • Start date Start date
M

Mavrik

Hi all,
I run a exe of VBNET on computer A, it run OK. But there is an error
(missing DLL - ag8614x_32.dll) when I run the same program in computer
B. I search dll on computer A and found at i386, Window\system and
Window\system32. I copied the dll from computer A to the same location
on computer B. Restart computer B and run program, the same error
(missing DLL display). Please help me to fix this problem. Thank you
very much.
 
It could be some DLL that your executable depends on is missing from
computer B. Download DependencyWalker
(http://www.dependencywalker.com/), install it on both computers. Open
up the executable and see if it says that any components that your exe
uses are missing. Sometimes some are missing, (usually mpr.dll is
missing that is usually OK to be missing). If there are any files
missing on computer B that aren't missing on computer A, then
distribute (and possibly register) them to computer B and try again.
 
Hi Hayworth,
Thank you very much for your help. I am new in VB.NET, would you pls
give me more details on how to distribute/register dll file.
 
Well, you can manually register things like DLLs and OCXes from the
Start/Run command of the task bar using "regsvr32.exe filename" or
"regsvr32.exe /u Filename" to unregister, but by far the easiest way is
to copy this code into a new text file called "RegisterOCXsAndDLLs.reg"
and then double click on it, which will put some stuff into the
registry which will allow you to register and unregister files simply
by right clicking on them in Windows Explorer and selecting Register or
Unregister from the popup context menu. Note that some DLL's can't be
registered and some can. If it can't, don't worry about it because it
doesn't need to be - you just declare it in your code and call it.

I would think your setup project in your solution should do the
registering for you. You can use the built-in installer maker in
VS2005 or get a separate one like Wise or Install Shield. I prefer
Wise.

Reviewing:

1. Open Notepad or Wordpad with a new text file, copy the following
into it, save it as RegisterOCXsAndDLLs.reg.
2. Double-click RegisterOCXsAndDLLs.reg and say yes when it asks you if
you want to change the registry.
3. In Windows Explorer, browse to your DLL or OCX. Right-click on it
and select Register or Unregister.

;========================================================
REGEDIT4

; This adds the ability to Right-Click on a .dll or .ocx
; and get the Register / UnRegister options.
;
; If it doesn't work for you, mail me and tell me about it.
; Jon Evans <[email protected]>

; ==========
; .DLL files
; ==========

[HKEY_CLASSES_ROOT\.dll]
"Content Type"="application/x-msdownload"
@="dllfile"

[HKEY_CLASSES_ROOT\dllfile]
@="Application Extension"

[HKEY_CLASSES_ROOT\dllfile\Shell\Register\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\dllfile\Shell\UnRegister\command]
@="regsvr32.exe /u \"%1\""

; ==========
; .OCX files
; ==========

[HKEY_CLASSES_ROOT\.ocx]
@="ocxfile"

[HKEY_CLASSES_ROOT\ocxfile]
@="OCX"

[HKEY_CLASSES_ROOT\ocxfile\Shell\Register\command]
@="regsvr32.exe \"%1\""

[HKEY_CLASSES_ROOT\ocxfile\Shell\UnRegister\command]
@="regsvr32.exe /u \"%1\""

; End
;========================================================
 
Thank you very much for helping me. It try this but there is the error
"can't find the dll file" right after I click "YES" to change the
register. Any idea ?
 
In Windows Explorer, you double click the RegisterOCXsAndDLLs.reg file
you just created. It will ask "Are you sure you want to add the
information in the file to the registry?" Click Yes.

After you've done this, in Windows Explorer, locate a DLL file or OCX
you want to register. Right click on its filename. A pop-up context
menu appears. At the top it will say Register, and possibly
Unregister. Click which action you want to take.

Alternatively, you can do Start/Run and then type in "regsvr32.exe " --
make sure there's a trailing space. Then bring up Windows Explorer
(not maximized). Click and drag the file you want to register into the
edit field of the Run box. If the filename is not all one word (like
it lives in a Program Files subfolder) then regsvr will think that
there are two files and just take the first one like "regsvr32.exe
c:\Program" In that case, enclose the filename in double quotes.

Should work. If it doesn't, please give very precise actions and error
messages. As you can see from the contents of that file, there is no
DLL file needed to run the RegisterOCXsAndDLLs.reg file so I don't
understand how you can get that error message.

Another nifty utility you'll wonder how you ever lived without is
PathCopy:
http://home.worldonline.dk/ninotech/
You can right click on a file and get all kinds of ways of copying the
filename: with and without folder, UNC version (if on a network drive),
enclosing in quotes, converting to short DOS ~ names, converting slash
directions etc. Again, works from a popup context menu. You can use
this to copy the long filename into the clipboard with quotes around it
so you don't have to add them yourself. Also great if you're using
Java (the slash conversion copying that is).

Did you solve your original problem using dependency walker?

Good luck,
Mark H.
 
Back
Top