Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  HOME    TRACKER    Visual Basic

Talk To USB Device Using Windows API


i want to send data to a USB Device(not HID). i want to make this application in visual basic. i dont know what windows APIs should be used and where is it?

could you help me?

View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
[Resolved - Thanx To Msayed2004]'Talk' With Windows Media Player *please Help*
I need two things for a program I'd like to write (mybe only one). What I want to do is have a hot-key that will stop/play WMP(9 series). I've got the hotkey thing worked out, but what I need to do is somehow tell WMP to Stop or Play (not Pause/play!). What code could I use to do this? I either need a) a way to actually 'talk' to WMP directly and 'tell' it to stop/play, or b) a way to simulate a key press system wide BUT, if I use option 2, I'm not sure what the ASCII of the stop/play key is that WMP responds to. Can anyone help?

VB Connect To Windows CE Connected Device.
Is there a way when a Windows CE device is connected to via craddle and active sync to be able to access data either from a vb program running on the device or from the pc to the device?  We'd like to do some updating of files on the devices but not just overwrite with the normal active sync connection.  Thanks, Joe

Hoe To Open Windows Explorer, In The MObile Device Folder
Hello: I normally use code as follows to open windows explorer in a particular folder

Code:hndl = Shell(Environ("windir") + "explorer.exe c:" ) (This would open explorer in the C: folder)

Does anyone know how to open explorer and point it to a connected pocket pc?? I thought it might be

Code:hndl = Shell(Environ("windir") + "explorer.exe Mobile Device" ) But this raises a 'folder not found' error

any help much appreciated.


Installed And RunAs Admin:Windows Cannot Access The Specified Device, Path, Or File.
I am getting an error message in one of the Apps I wrote. I was wondering what some possible causes and solutions could be? Thanks.

I am getting this message even though I installed and ran as admin:


C:Documents and SettingsAdministratorDesktopofficeBar.exe
Windows cannot access the specified device, path, or file. You may not have the appropiate permissions to access the item.

Possible solutions:

Solution: This error message may sound severe, but it’s really a fairly minor issue. Select multiple icons on the Desktop, including Internet Explorer, and then press the ENTER key on your keyboard, and you’ll likely run into this error message. To avoid seeing this error message (you guessed it), don’t select multiple icons on the Desktop, including IE, and then press ENTER.

scanreg /restore

Under recent Windows XP patches (called Service Pack 2 or SP2) there is
an "unblock" setting that you must provide when you transfer a executable
file from one computer to another. Until you "unblock" the file,
you will get the message

"Windows cannot access the specified device, path, or file. You may not have
the appropriate permissions to access the item."

Fix: to fix this,
1) right click on the file and select "Properties"
2) click the "Unblock" button.

Getting Device List From Device Manager With Setupapi
I had need to figure out which COM port a USB-serial converter was installed as. If you looked under Device Manager, it was easy to tell from the names. First I tried EnumPorts, but that just gave me the COM number and 'Local Port'. I tried using the WMI, but the device I was looking for was the one that it wouldn't list for some reason. (Worked fine for my other virtual COM port USB device.) So I stumbled onto the setupapi library, but there was no VB examples, only some C. So through some trial and error, I devised a DeviceLister VB6 class to get names and descriptions of devices. It could be changed to include more, but I stopped at names/descriptions.

By five-cent example returns a list of 'Ports' devices (your results will vary):
ECP Printer Port (LPT1)
Communications Port (COM1)
Digi PKG-U Serial Port Adapter (COM16)
^-that last one was the sucker I was after

I thought 'Hey I wonder if anyone else would be looking for this?' so I post it here. It's not the prettiest implementation, but might be a starting point for someone.

Note: The MSDN seems to indicate that this only works for Win2k and beyond.

EDIT: I added an example of retrieving all devices. Also I setup an option to list devices that are not present. Now I can see ports that were installed but aren't active.

Edited by - FD 80 on 6/20/2008 11:35:57 AM

Uninstall A Device From Device Manager.
Hi all,
Is there a way to uninstall a device in device manager with vb6?

I've run into a rootkit that I am trying to make a tool of mine remove. I've tried simply stopping the service but this can cause BSOD's which we all know are fun in windows.

As always any help is appreciated,


Someone Like To Talk?
Hi, My name is Salomao, I live in Brazil (South America), Sao Paulo - SP. I'm begining programing of 24 YOld, telecom worker in an international American Bank.

I like to talk in english very much to train, but unfortunally my teacher get back to your country and now I don't have way to do this.

What I prupose is simple, secure and for free. I just would like some foreing to talk at the phone just 5 minutes through the previous acheduled days (without importune) about anything.

I'm hones and have good sense, if someone would like to help with this would be great.

Thanks anyway.

how do i make the computer talk? i'm currently running on pentium xp. i was wondering if different computer plays different voices. i'm trying to visit but it seems to be down for me. proabably my internet. anyway if anyone can show me a tutorial or a example on how to make the computer talk

maybe requires some sort of dll which as all the sounds? eg aa, ffur

Talk To Me
I am trying to create a small program that will basicly respond to things that I type. I was wondering what would be the best way to store words. I don't think that a text file would be very good to use so is there another type of thing that I could use to store types of words. Thanks for any help that anyone can give.

Talk To Me!!!!
hi guys,

Can someone guide me how to accept user input (voice input )

I wanna make my applications user friendly.

So the first step is to understand what the user speaks.
ANy body got any pointers pls. ..... please.....Please help me.

Thanks .

How To Talk With Another Exe???
Hi All,

How to check whether an application is already in a running state or not.

Thanks & Regards,

How To Talk With Another Exe???
Hi All,

How to check whether an application is already in a running state or not.

Thanks & Regards,

I have a problem talking to a dos shell exe.

I can open the program but I can not operate the program from a VB6 program I am making. The dos run program uses the alt key then a letter to go through the menu. Everywhere that I go to find code to write no one has a clue.

The Dos program has to run and be available while so the vb program can control it.

Has anyone ever Come across this problem before?

Talk Over Then Net
ok.with winsock.ocx i making a talk thing. you connect to an ip address. and click a button and tilk with a mirc. but i do not know how to do this. can any one till me. like on aim 3.5 or yahoo messager or netmeeting.

How To Talk To C++ App
I have two programs, one written in VB, and one in C++ using mfc. The C++ does some deep hairy system stuff, and the VB program is a user interface for controlling the C++ stuff.

Most of the time, only the C++ program is running. However, when the user needs to change something, the VB program will come up and, after the user makes changes, it needs to tell the C++ program what to change.

I need a way to pass string data between the two programs. I know how to subclass the VB window, but I don't think you can pass strings between the programs with messages since they are in different threads.

It'd be great if I could use COM to expose some custom interface for the communication, but as I understand it there's no way for a C++ program to access a VB activex .exe, and the VB activex .dll can only have a modal dialog.

Finally, I wonder if I can pass another instantiated COM object which is owned by the C++ program to the VB program so the VB program can "share" it with the C++ program.

Any suggestions?



Forms That Talk?
I'm writing an application that has many forms. One for parts, one for vehicles, blah blah. I've decided to create one search form for all of them to use. I pass it the information it needs to do it's job. One last thing I need to do is to tell it what form has called it, and where to pass the information back to.

For example frmParts calls the search form. When I DoubleClick on the appropriate entry on my search form, it should pass that value back to frmParts.PartID.text. I would like to be able to give that information to the search form ahead of time, and make this search form as modular as possible.

Has anyone ever done this, and can you provide any ideas?

Getting Sax Basic To Talk To VB6
I'm running out of ideas. What would be the most effective and fastest way to send data from sax to vb6? It's basically a stripped version of Basic, and does not share any of the advanced features of VB6.

Talk Me Into Using VB For My Game...
I use VC6, BCB5, Delphi5, and VB6. However, I am really tired of pointers, header files, and lengthly code that is so error prone for the dumbest reasons. Yep, that's VC++ I am referring to.

Years ago I used VB exclusively and found that with the Win32-API, I could write about anything in a lot less time and have more fun doing it. The same goes for Delphi. I used it a lot too and it was as fun as productive. Then I started using VC++ and got addicted to the IDE and how powerful it was. I never really got hooked on the CC++ syntax though as it can be a total pain.

Now I want to write a small shooting gallery game just for fun. I started it in VC++ with OpenGL. I am sick of it already. C++ has gotten to me. I am C++'d out!

So here I am, wanting reasons to use VB6 and not VC6 or Delphi. Please give me some! Help!

Thanks, Larry.

Access Db Needs To Talk To A App
How can I get an Access app to talk to a app - they need to pass each other data and possibly call public functions etc.

Is it possible to write a class in Access that sends and receives data through sockets?

Any advice much appreciated


Google Talk
who do i get the Google Talk Contact list count in the main window named "Google Talk"

I tried with SendMessage, my code works well with ListView controls, but doest not work with Google Talk List View.

Option Explicit

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long

Private Const LVM_FIRST = &H1000

Private Sub Command1_Click()
Dim wnd As Long
Dim chwnd As Long
Dim cchwnd As Long
Dim itcount As Long

wnd = FindWindow("Google Talk - Google Xmpp Client GUI Window", vbNullString)
chwnd = FindWindowEx(wnd, 0&, "Main View", vbNullString)
cchwnd = FindWindowEx(chwnd, 0&, "Contact List View", vbNullString)
itcount = SendMessage(cchwnd, LVM_GETITEMCOUNT, 0, 0)
MsgBox itcount

End Sub

VB Talk To Hardware? Possible?
Hello. I have question either can vb develop a allpication to iunteract with the printer or floopy disk drive. I want to count how many pages the printer have printed or detact either the A:/ drive is there or not. I have ideas that C, C++ or Delphi can do until the hardware level but not sure either the VB can or not.

Just give any opinions. Thanks

Talk To An ACT! Database?
I am trying to write a program that will add a new contact to our master database and enter some data into some specific fields. I have written programs that talk to DocuWare, SQL, Access, and Oracle databases, and I'm wondering if there is anything different about talking to an ACT! database.

For the others I created ADODB connections and recordsets and ran select and insert queries through the recordset with 'open'. Can I do the same for the ACT! database?

Also, I don't see any specific drivers for ACT! in the system data sources of the ODBC manager. This is how I set up the connection string for all the other projects I did. ACT! uses an extension of .dbf, as does micrsoft dbase. Could I make a system DSN with that driver?

I've searched several VB sites, these forums, and google in general for writing a visual basic program to talk with ACT! and came up with nothing. Any help or previous experiences shared would be greatly appreciated. Thanks.


Talk To And From A Webpage
I want to create a website, that can beable to talk to and from my webbrowser (that im makeing). and have it do all kind of diffrent things.

How would i go about doing something like this?

Google Talk In Vb
hi ppl
I know its very new, but is it possible to import g-talk object in vb and send/receive PM?

Making Same App Talk ?
Hi guys,
Is there a way two applications communicate to each other over a network, without using Winsock control.

See i'm developin an app that controls the petty cash,
it works this way, when i request for an item to be purchased. i fill a form on my machine. is it possible to make the appcheck whether the same app is running on another machine in the same network and activate a certain form on that machine.

Thanks guys

Small Talk
Does the "Small Talk" application programming application have any advantages or weaknesses compared to VB6??

I never even heard of the language until recently ...

Thanks for any input.

Can VB Talk To MSDOS?

Is it possible to create a visual basic program that talks to MSDOS.

I know how to create a console and talking to consoles etc, but I want to run a VB .exe file with arguments from MSDOS. The problem is that dos runs the program and returns the dos prompt straight away. I want to be able to hold the prompt until the program has stopped running and be able to print to the dos window (in the same way you can with javas system.out.println)

Hopefully there is a VB guru that can help me with this!!

Can 2 Dll's Talk To Eachother?

in 1 dll i open a connection and a recordset to a database which the user determine, lets say "test".
in the other dll i declared an object called "cabinet" with which i can "add file" to it. the "add file" function is based on adding a record to a database , which means, based on the other dll open connection and recordset, does the dll can be based on things that "happened" on another dll ?

Can 2 Dll's Talk To Eachother?

i made 1 dll with functions/procedures that connect me to a DB
and do some stuff with it (add,delete etc.)
now i want to make another dll which is a class of a cabinet (for example)
i want to give it an "add" function, which is based on the connection and recordsets from the 1st dll, how can i tell it to do so ?, use the connection and recordset from dll X and add a new flier to the cabinet

Application Talk

I am currently making a server system which is 5 servers (web, mail etc) all in one app, yet if one server crashes then they all do which is, quite frankly, very poor. So, how can i make my applications talk to each other (they are on the same pc) ?, is it possible (i think so) to set the text in a textbox of another application (i could do it this way ?)

Any Ideas ? Any help ?

Many thanks.

Talk To Me And Reach Out
I'm working in a big Internet Cafe almost 4 years. Now I
hate to check its computer whether they are accessing internet or not . Now if one user want to do other things and he/she can automatically disconnect the internet or i say he/she click the button to disconnect internet. Sample,
a "first computer" is a server and attached with the modem and also a Proxy server using socks firewall.
and it is connected to the internet. The "Other Computer" is in Lan Network and connected to the "First Server" in order to access internet. Now one of the computer disconnected to the internet access but the "Other computer" will still accessing internet and the "FIrst server" still connected to the net

Talk to me....

Ok Lets Talk Pacman
lets ask how to tell the computrer that when you press the up arrow you move up

WinSock - Straight Talk
Can someone tell me if WinSock is usable within VBA (specifically Excel)?

I've seen tid bits here and there suggesting that you need VB in order to use the Winsock API's, that it can only be used in forms, etc. Fyi, I downloaded the modWinSock.bas available that this site and all I get when executing gethostbyname is 0.

Thanks for any comments!

I Am Absolutely Flat Out New To COM And Need Help - Using COM In VB6 To Talk To C EXE

I have no idea what I am doing in COM.

I have tried example after example and reading whatever I could find,
but I seem to be missing something fundamental.

I need to capture certain information from DXF files and send it to a
C executable (WinCad) so that the WinCad will create a list of parts
to be made by a machine we use here. Right now this process is done
by hand.

WinCad is a program written by the manufacturer of the machine, I have
no source code for it.

It appears, to me, that all I need to do is reference WinCad, then
write the code to talk to it. It seems that I am wrong about this.

I am getting the error "Function or interface marked as restricted, or
the function uses an Automation type not supported in Visual Basic."

I know that WinCad can be used that way I am trying to use it. When I
asked if this could be done I was sent VC6.0 source code which, when
complied, uses WinCad to create parts.

I know next to nothing about C. It took me several attempts just to
get the workspace open.

My reference to WinCad was added by Browsing in References to a
TypeLibrary I generated (using the IDL I included below). The
reference does point to the proper file/location. The IDL was created
by copying what I saw in WinCad.exe in the OLEViewer.

Any and all assistance would be GREATLY appreciated - I have been on
this project WAY too long!

My code is run by clicking a button in a form, all I have is the

Option Explicit

Private Sub cmdRun_Click()
Dim objWinCadServer As PartDoc
Set objWinCadServer = New PartDoc

Dim objParts As Long
Set objParts = objWinCadServer.SetPartData("TestJob", _
"Testgrp", "DelMe", 5, 105.2, "", "", "", _
"FB", 386, "", "", 0, 0) 'As Long
End Sub

From the Object Browser:
| WinCad
| Classes: | Members of 'PartDoc'
| <globals> | =\ GetSpecification
| MultDoc | =\ RefPlane
| PartDoc | ...
| ShapeDoc | =\ SetPartData
| WincadProxy | ...
| Function SetPartData(strJobid As String, strGroup As String,
| strMark As String, iQuanity As Integer, dLength As Double,
| strDesctp As String, strDesc As String, strGrade As String,
| strFabcode As String, bMeasureWebDepth As Long,
| strRemarka As String, strRemarkb As String,
| nMeasureSystem As Integer, iChannelLeg As Integer) As Long
| Member of WinCad.PartDoc

Making One Program Talk To Another?

I'm trying to make one of my visual basic programs talk to another one, but I've got no idea how.

Program 1 has two variables, say $blah and $blah2.... and I want to pull these into Program 2. When this happens, is there some kind of event that can be called (so a bunch of commands can be ran?)

Ideas suggested to me were DDE, local winsockets, COM automation. I'm not sure how I can achieve what I want with either - I'm usually a unix developer, not a windows one.

Please help! (sample code would be awesome)


Can An Excel Macro Talk To IE?
I am required to have fields on a web app populated when certain fields of an excel macro are selected.

Is it possible to target Fields of an HTML form from a macro or any VB app?


Make Vb Talk To MSWord
I really am really really stuck.

I have a form in word with which I need to update with data through my application either with bookmarks or with text form fields.

I have tried a few things but cant get any to work for me.

Please help I dont have a lot of hair left!

K Black

How To Get Workstations To Talk To Each Other -- Need Some Concepts
I have a fair amount of experience with VBA, but other than a few practice projects, haven't done much with VB. I'm trying to come up with a workplace communication tool, and I need some basic ideas.

Can I write a program that creates a new Windows Registry key and exposes it to other workstations in the workgroup?

I want to be able to have one workstation's copy of my software set some values that another workstation's copy can read on a timer event without excessive bandwidth consumption. So, rather than have a little database on the file server that all the workstations have to get a value from (checking every couple of seconds) the program can read a value stored on the local machine, and only go out to the network to update a value elswhere...

Make any sense? Hope someone can point me towards some information.

Project -Turkey Talk
This does not realy fit any forum on here, but I would like to run it by you to see what you think. Suggestions welcome.

I was asked and agreed to take on a project for a local foodbank. Around Thanksgiving, a HUGE TURKEY (wood and paint) is erected in a grocery store parking lot. There is a wooden door (3'x2') that the person opens up and puts the food in that they want to donate. The door has two hinges on it and opens horizontal. To make a long story short, i was asked to come up wit a way so when the door is opened the turkey says "gobble gobble".

What I was thinking was using a computer with a program that plays the "gobble" and a switch on the door that would trigger the program to play the sound.

I know this is very vague.

Please let me know what you think or how it this project should be accomplished.

NOOB- Need To Talk To ISA Bus Card Through VB^

I am a poor underfunded graduate student who has been given a MiniBird II ISA bus card that performs magnetic 3-D tracking of a sensor. I have the manual with the necessary commands to control the card, however, I have no clue as to how to get those commands to the card through VB6. I simply want to send a hex or binary value to a specific base address, and then read data back from that address. The company that makes the card has written no working DLL or OCX that can do translations for me. They provide no compatible driver for this card in the ISA bus, but I dont think you need a driver to talk to the card through ISA.

How do I communicate to an ISA BUS?

Please any suggestions would be appreciated, but be aware that I am not an expert programmer, so dumb it down for me. thanks

Can I Make My Program Talk ?
i want my program Pronounce the numbers in textbox or combobox or any control.
is there a control for that or a normal code or api functions or anything ?

Talk To Comm Port
How i want to send a signal to Comm port no 3 if any condition occur in my system..i want to control a gate in cassete conveyor..the gate will connect using comm port 3..then if error occur in mysytem..the gate is will not open..
how to send a signal?
what kind is better signal to send? (0/1, TRUE/FALSE OR OTHERS)

H4x0r Talk Program

How To Make Two Applictions Talk?
Is there anyway to send a message from one application to another. In particular, I want one program to send a message to another to let the second application know where the first is in processing.

Does this make sense????

How Can I Talk To Stored Procedures?

if i want a simple select i open a connection and a recordset and execute the sql
but if i want to activate a stored procedure of an oracle database with parameters, how do i do that ?

Talk About A Newbie Question..
I don't believe I'm asking this (been doing vb for over a year now), but is there a way to change the forecolor/fontcolor on a command button? I seem to remember being able to do this a while aog, but I can't find it now?

Teenage Programmer
Visual Basic, HTML, C++, JavaScript
ICQ#: 9872708

Hey I Need A Coding Buddy To Talk To
I would really appreciate if anyone is willing to have a coding buddy, someone that I can ask question or need help with vb6 if I need it or someone that can tell me if I can make the code more efficient..well thanks , don't know any one else so I guess I ask here..prefereably on MSN or AIM.

How To Talk To Multiple Forms? VB6
Hi everyone.
Can someone help me out? I'm a newbie trying to write a simple app with multiple forms (not MDI) but I can't seem to call a sub procedure from one form to the other. I don't really know what to do because I'm just learning.

If someone can help me, I'd really appreciate it,

How Can I Talk To 802.11g Wireless Port Using VB6.0
dear all

how can i talk to 802.11g wireless port using VB6.0
murli c

Copyright © 2005-08, All rights reserved