USB
  CP2103, VCP runtime DLL VB6

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone! next newest topic | next oldest topic
Author Topic:   CP2103, VCP runtime DLL VB6
Techpaul
New Member
posted August 11, 2010 05:44 AM     Click Here to See the Profile for Techpaul     Edit/Delete Message
Yes it is VB6 -SP6 (for a reason too long to explain here).

Basic issue is inability to load DLL (in the same directory as source and latest version) when doing debug/interactive mode. Returns
file not found error.

As compiled executable placed in same directory as source and DLL, runs.

This means it is impossible to debug full application with DLL calls in.

This also happens on the VB6 example from from AN197 for getting Port number, running source errors and compiled runs.

I have a test app with ONE call to runtime dll and that fails in source version, works as executable.

Declaration line is

Public Declare Function CP210xRT_WriteLatch Lib "CP210xRuntime.dll" Alias "CP210xRT_WriteLatch" (ByVal cyHandle As Long, ByVal bmask As Byte, ByVal bLatch As Byte) As Integer

Call is

Dim ret As Integer

ret = CP210xRT_WriteLatch(MSComm1.CommID, &HF, GPIO)

Anyone have any clues, suggestions

IP: Logged

Tsuneo
Member
posted August 11, 2010 06:36 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
> Basic issue is inability to load DLL (in the same directory as source and latest version) when doing debug/interactive mode.

Copy the DLL to the "debug" folder, in which the .exe is made, instead of the source folder.

Tsuneo

IP: Logged

Techpaul
New Member
posted August 11, 2010 06:44 AM     Click Here to See the Profile for Techpaul     Edit/Delete Message
Sorry which folder do you mean by 'debug', the simple test app is in its own folder has 5 files for VB, the runtime dll in it.
The 5 VB files are the two VB project files simple form two files (.frx and .frm) and a .bas module containing the definition/declaration.

Nothing else in the folder.

Run the app as source in Visual Basic "File not found error" on first call to dll.

Compile the source and place the executable in the SAME folder as the VB files. Executable version works.

There is no debug folder they are all in same folder, one way works one way does not.
So the DLL can be found but only if run as executable.

If I could send a 27kB zip I would.

[This message has been edited by Techpaul (edited August 11, 2010).]

IP: Logged

Tsuneo
Member
posted August 11, 2010 08:09 AM     Click Here to See the Profile for Tsuneo   Click Here to Email Tsuneo     Edit/Delete Message
> Run the app as source in Visual Basic "File not found error" on first call to dll.

In this case, the DLL is placed in the Visual Studio IDE folder, or C:\Windows\system32\

Tsuneo

IP: Logged

Ueli
New Member
posted August 11, 2010 10:00 AM     Click Here to See the Profile for Ueli   Click Here to Email Ueli     Edit/Delete Message
Put in the DLL in the following folder, like this (it an vary, depends on the OS-language):

I had the same problem and this solution works for me.

C:\Program Files\Microsoft Visual Studio\VB98

ueli

IP: Logged

Techpaul
New Member
posted August 11, 2010 10:27 AM     Click Here to See the Profile for Techpaul     Edit/Delete Message
Well putting driver into windows\system32 PARTLY worked.

Now got it resolved.

I had downloaded everything last week, and re-downloaded this afternoon.

Reinstalled driver (third time), this time for some reason was a version update, where as it was not last week.

Went through the app note software and made sure this up to date, and spotted that some of the app note software has different dates on DLLs, between compiled example and source directory. Rechecked all examples with latest dated even if version was the same.

Appears to have fixed it.

Most noticeable date discrepancy is AN223 port config application and source have DLLs of different date (about a week different).
AN197 contains only one dated DLL (on all copies).

Thanks for the pointers, obviously other drivers have silently back installed the DLL for other devices.

--
Added on edit

Additional note I will put up somewhere some VB6 simple examples, with notes for others to use and post on this forum later the URL.

[This message has been edited by Techpaul (edited August 11, 2010).]

IP: Logged

Techpaul
New Member
posted August 11, 2010 12:42 PM     Click Here to See the Profile for Techpaul     Edit/Delete Message
As promised earlier package of simple VCP Runtime DLL and VB6, if future use to anyone is available at -

http://www.pcserviceselectronics.co.uk/silab/cp2103test.zip

Hope that helps others as well

[This message has been edited by Techpaul (edited August 11, 2010).]

[This message has been edited by Techpaul (edited August 11, 2010).]

IP: Logged

All times are CT (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | MCU User Forum

Have you seen our MCU Knowledge Base?


Ultimate Bulletin Board 5.47b