Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / July 2006

Tip: Looking for answers? Try searching our database.

EXE and VBE difference

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vul - 14 Jul 2006 16:52 GMT
I'm trying to use DLL created in VB 2005 in VB6 project.
I did everything to make it work with late binding. It works when I run
compiled EXE and produces an error 'The system cannot find the file
specified' on the first line of this code:

Dim objXML As Object
   Set objXML = CreateObject("WorkorderXML.WorkorderXML") 'it is
WorkorderXML.dll
   objXML.ConnectionString = strConnectionString
   objXML.WorkorderID = 19
   objXML.PathToXML = App.Path & "\Workorder.xml"
Jeff Johnson - 14 Jul 2006 17:19 GMT
> It works when I run compiled EXE and produces an error

Uh, does it work or does it produce an error? In my book, those are mutually
exclusive.
vul - 14 Jul 2006 17:34 GMT
Sorry,
It does work when I run compiled exe. If I attempt to run from VB
environment it produces an error.

Al

>> It works when I run compiled EXE and produces an error
>
> Uh, does it work or does it produce an error? In my book, those are
> mutually exclusive.
Tony Proctor - 14 Jul 2006 17:49 GMT
Is your VBP file in a different location to your compiled EXE? If so then
the value of App.Path will be different in the two cases. In the IDE it will
be the location of the VBP file, and in the compiled EXE it will be the
location of the EXE file.

   Tony Proctor

> I'm trying to use DLL created in VB 2005 in VB6 project.
> I did everything to make it work with late binding. It works when I run
[quoted text clipped - 7 lines]
>     objXML.WorkorderID = 19
>     objXML.PathToXML = App.Path & "\Workorder.xml"
vul - 14 Jul 2006 17:58 GMT
VBP and EXE are in the same location. I also start my VBP by double clicking
on it to avoid the problem with App.Path.
DLL is in the same location and was registered with regasm.exe
DLL was developed on different machine. On that machine VB6 client works
fine with both, EXE and VBP
What's the difference?
Al

> Is your VBP file in a different location to your compiled EXE? If so then
> the value of App.Path will be different in the two cases. In the IDE it
[quoted text clipped - 15 lines]
>>     objXML.WorkorderID = 19
>>     objXML.PathToXML = App.Path & "\Workorder.xml"
TDC - 17 Jul 2006 13:04 GMT
No, the .NET Framework has no notion of your VBP.  When in the VB6 IDE,
you need to have your files where the executable is...which is vb6.exe.
Look for it in program files\ms visual studio\etc\etc...

I suggest writing a little BAT file that copys them in and deletes them
out of that dir so you can cleaunp when development is complete.
Otherwise that dir can get awfully messy.

Tom

> VBP and EXE are in the same location. I also start my VBP by double clicking
> on it to avoid the problem with App.Path.
[quoted text clipped - 23 lines]
> >>     objXML.WorkorderID = 19
> >>     objXML.PathToXML = App.Path & "\Workorder.xml"
vul - 17 Jul 2006 18:27 GMT
I met the problem with locations of MyProject.vbp (MyProject.exe) and VB.exe
awhile ago. I do not remember exactly, but I think it was the problem with
App.Path. It contained the different values when I open my MyProject.vbp by
double clicking on it and when I opened it from Visual Basic environment. In
the second case App.Path contains the path to VB.exe. Since that I always
open my VB projects by double clicking on them. I had no problem with any
file located in App.Path folder with their paths.
Now I have
I'll try to see how it will work when I'll make a copy of the file I'm
working with and place it in VB.EXE folder.

Al

> No, the .NET Framework has no notion of your VBP.  When in the VB6 IDE,
> you need to have your files where the executable is...which is vb6.exe.
[quoted text clipped - 36 lines]
>> >>     objXML.WorkorderID = 19
>> >>     objXML.PathToXML = App.Path & "\Workorder.xml"
vul - 18 Jul 2006 13:52 GMT
Doesn't work when I place DLL in the same as VB.EXE folder

> No, the .NET Framework has no notion of your VBP.  When in the VB6 IDE,
> you need to have your files where the executable is...which is vb6.exe.
[quoted text clipped - 36 lines]
>> >>     objXML.WorkorderID = 19
>> >>     objXML.PathToXML = App.Path & "\Workorder.xml"
Jim Carlock - 18 Jul 2006 15:23 GMT
> Doesn't work when I place DLL in the same as VB.EXE
> folder

Open the .vbp file and take a look at the paths it identifies in
there?

Signature

Jim Carlock
Post replies to the group.

TDC - 18 Jul 2006 15:34 GMT
Did you register it (using regasm) to the VB6 folder?

> Doesn't work when I place DLL in the same as VB.EXE folder
>
[quoted text clipped - 38 lines]
> >> >>     objXML.WorkorderID = 19
> >> >>     objXML.PathToXML = App.Path & "\Workorder.xml"

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.