|
Anil,
1.i have one USB Printer i dont know its name
2.That printer connected to one of my USB ports.
3.i know that printer's VID/PID and HWID.
4.now by using any/all of ID/PID and HWID i would like to get printer name.
if there is any way to get USB Printers VID/PID,HWID and Printer Name collectively(like structure),i wll compare my vid/pid or HWID with the data that i get in some way and i will collect the printer name in the same data(like structure).
i want that way( how to get Printers VID,PID,HWID by using any of SDK fun..?)Cheers,
Are
|
|
|
|
|
If you can use DDK then
try this API UsbBuildGetDescriptorRequest()
and also the structure USB_DEVICE_DESCRIPTOR
or your can get the VID and PID from registry or INF file describing such a device.
Regards
Anil
|
|
|
|
|
Ravinder Are wrote: now i want to get Printer name using the above available INFO!
is EnumPrinters is of any help
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hai,
Iam c++ programmer,Actually I know Mfc,Com but i havent worked on it.
Now the problem is i got a chance to work on MFC,COM And Boost Graph library
At a time ,So please guide me which is the best way to simple my work.
My project is n Maintainence phase, and my work is to fix the bugs.
please show me the way which enlihtens my career.
Rayalu
|
|
|
|
|
You should read lot's and lot's of articles related to COM. As you said your project is in the maintenance phase you won't be having much to work. So read the documentation/ code of the project and try to develop some basic applications that are related to your project/module. This will help you gain some confidence.Bugs come and go iff you know where the loop hole is
Wishes.
Anshuman Dandekar
Dare to Dream,
Care to Achieve.............
|
|
|
|
|
Thank you Anshuman.I follow your advice.
|
|
|
|
|
I am trying to automate word in VC++; the problem is that the api exposed by Word expects me to pass a Variant* of a structure.How can I convert a userdefined type (structure of two long values in this case ) to a VARIANT.
Any clues??
|
|
|
|
|
How do you expect Word to know about your user defined type in any case?
If this is really what you want, usually you pass a binary object that the receiver knows how to interpret. Or in other words you pass a SafeArray with the VARIANT.
--
Roger
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
In VC.NET where multiple projects(solution files are there) are there which on the whole constitute one project, when debuging the breakpoints are getting is getting disabled
i.e
The breakpoint will not currently be hit. No executable code is currently loaded at this location.
Can anyone help please.
Thanks,
---Arun.
|
|
|
|
|
Our application running in debug mode perfectly but is crashing in release mode.
can any one please explain what could be the probelm.
Thanks,
---Arun.
|
|
|
|
|
See here[^] for some clues...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Actually we have ported an application from vc to vc.net. The application is working fine in vc release mode but crashing in vc.net release mode. Thank you for your earlier suggestion.
|
|
|
|
|
Add the /GZ[^] option to your debug build. It's good form to do a build with this option from time to time even when you haven't got a release only bug.
Steve
|
|
|
|
|
Actually we have ported an application from vc to vc.net. The application is working fine in vc release mode but crashing in vc.net release mode. Thank you for your earlier suggestion.
|
|
|
|
|
arunperi wrote: Actually we have ported an application from vc to vc.net.
Have you tried to debug your application.. at what point it is failing.. as it very difficult to tell exactly where is problem is..
I too face similiar problem.. More Info[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I dont known how to use file dialog controls.Give me the example how to use the control.
|
|
|
|
|
What control in the File dialog do you wish to use?
Owner drawn
Jesus Loves
|
|
|
|
|
i wish to use open dialog control .so give me the code in api.please help me.
|
|
|
|
|
There is no Open Dialog Control.
But I guess you would like to use the CFileDialog class.
CFileDialog cfd(TRUE);
if(cfd.DoModal() == IDOK)
MessageBox(cfd.GetPathName());
Owner drawn
Jesus Loves
|
|
|
|
|
This is how we do it with OPENFILENAME :
From MSDN:
OPENFILENAME ofn;
char szFile[260];
HWND hwnd;
HANDLE hf;
ZeroMemory(&ofn, sizeof(ofn));
ofn.lStructSize = sizeof(ofn);
ofn.hwndOwner = hwnd;
ofn.lpstrFile = szFile;
ofn.lpstrFile[0] = '\0';
ofn.nMaxFile = sizeof(szFile);
ofn.lpstrFilter = "All\0*.*\0Text\0*.TXT\0";
ofn.nFilterIndex = 1;
ofn.lpstrFileTitle = NULL;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = NULL;
ofn.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;
if (GetOpenFileName(&ofn)==TRUE)
::MessageBox(NULL, ofn.lpstrFile, "File Open", MB_OK);
Owner drawn
Jesus Loves
|
|
|
|
|
U can use CFileDialog MFC class, just search google to find example of CFileDialog
|
|
|
|
|
i wanted to use open dialog control in api.
|
|
|
|
|
hello
In my mfc vc6 program, I COM connect to msn messenger sink via advise and also can disconnect with unadvise. All is well and I can control MSN very well.
However, if in taskmgr you kill MSN IM, how does my program detect if its connection is "lost" with msn IM (since it was killed) and if so detected, doing an unadvise wont work for the msn sink is now gone.
Any adive?
Thank you
|
|
|
|
|
Hi all!
I want to write a application for " Connecting to a HTTPS server with SSL". I use Visual C++ 6.0 programing language.
Please give me a way connecting to a HTTPS server with SSL by VC++ 6.0
Please answer me soon. Thanks all.
Huynh Ngo Phuoc Tuyen - Vietnamese
|
|
|
|
|
Try this
http://www.codeproject.com/internet/wininet_ssl___certificate.asp
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
XMinds
|
|
|
|