|
I use this approach when querying audio devices using the ANSI API's ...
<pre>
// Get details for the device registered in this class
DWORD size = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA) + MAX_PATH * sizeof(WCHAR);
// use vector so it will clean up afterwards
std::vector<BYTE> buffer(size,0);
// set up the pointer
SP_DEVICE_INTERFACE_DETAIL_DATA* pDevInterfaceDetails =
reinterpret_cast<SP_DEVICE_INTERFACE_DETAIL_DATA*>(&buffer[0]);
// let SetupDi know how big a buffer we have ...
pDevInterfaceDetails->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
// get the device path ...
if (!SetupDiGetDeviceInterfaceDetail(hDevInfo,&DID,pDevInterfaceDetails,size,NULL,&DevInfoData))
{
continue;
}
Apologies for CP formatting ...
Jerry
|
|
|
|
|
Thank you thank you thank you! Jerry, despite the CP formatting, you just helped me solve my problem! Thanks!
|
|
|
|
|
"Error spawning 'cmd.exe'"
I always got this error when I build my project (using VS2005).
Please help me to solve this problem.
|
|
|
|
|
Max++ wrote: Please help me to solve this problem.
Start here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi, I've set breakpoints in my application. Last night my breakpoints were being hit ok. This morning none of the breakpoints that are set are being hit. So I deleted the project's NCB file. Spurious results at best. I deleted the NCB file again, restarted, cleaned project then rebuilt and my breakpoints are being hit again. Yeah.
However, if I set new breakpoints those breakpoints are missed/skipped.
WTH?
Signed,
Perplexium ad infinitum
|
|
|
|
|
Are you sure you are running a debug build?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
In VC6 at least, breakpoints are stored in the .opt file. .ncb is a pest that gets corrupted regularly by intellisense!
Iain.
In the process of moving to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), give me a job!
|
|
|
|
|
Didn't know the OPT was used for that! Thank you!! :P
I was able to get it to work - after I deleted all my breakpoints. I'll now next what to do ahead of schedule.
Cheers!!
|
|
|
|
|
how to control Stepper Motor Control drive through serial Port member
hi, nice to meet you good people down there. i am a novice programmer, i will be very grateful if you could help me please
how can i control Stepper Motor Control drive through serial Port instead of parallel port by using language such as c/c++
My kindest regards
Sahih
|
|
|
|
|
sahih wrote: how can i control Stepper Motor Control drive through serial Port instead of parallel port by using language such as c/c++
All depends how the serial port interfaces with the stepper motor compared to the parallel port (do PCs still come with those?).
Here's a good place to start with serial port programming[^], anyway.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Does your stepper motor driver support serial port communication?
If the answer is yes then check out the relative documentation to understand what your application should do. PC side serial communication is a well-trodden path and you will find tons of tutorial, samples, etc...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I am drawing using OpenGL and GDI on top of a picture which were drawn before in CView::OnDraw function.
First 2-3 seconds it draws sucessfully, and then cursor of mouse become "clock"( meanth beasy )
and on the screen is nothing drowning. Also the same problem apear during drawing of progress bar, after some time
it become grey and squares of progress bar isn't drawn.
|
|
|
|
|
I don't know what "meanth beasy" means.
Gastello wrote: on the screen is nothing drowning
Is stuff supposed to be drowning?
Gastello wrote: it become grey and squares of progress bar isn't drawn.
Well you didn't ask any questions but given what you did say it sounds like you should consider getting some good material (books or internet tutorials) designed to teach beginners how Windows Device Contexts and Drawing/Painting works.
good luck
|
|
|
|
|
led mike wrote: I don't know what "meanth beasy" means.
My gibberish translator suggests 'means busy'? I've never seen a keyboard with a lisp before now, though...well, apart from this one[^].
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Sory for my English
"means beasy" means "sand-glass" cursor appear
I am not amateur, and I don't have time to learn in detail how Windows Device Contexts works. I did not put any question because I explained the problem, and usualy peoble understand it that I need help to solve the problem.
|
|
|
|
|
Gastello wrote: I am not amateur, and I don't have time to learn in detail how Windows Device Contexts works.
This is a sad, sad thing. Source of pain also.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Gastello wrote: I am not amateur, and I don't have time to learn in detail how Windows Device Contexts works.
Ok, then are you aware that you just contradicted yourself in one sentence?
|
|
|
|
|
Did you understand my problem? Do you know how Windows Device Contexts works?
|
|
|
|
|
I have limited time on fixing bugs and implementation any tasks. I usualy sleep at nights.
|
|
|
|
|
Hi There.
I am using VS2008, and am facing above problem.
Just FYI, I am calling WmCpyDta_GetMessage_sTagData() function as below...
WmCpyDta_GetMessage_sTagData(NULL, NULL, lParam, strTag.GetBuffer(0), strData.GetBuffer(0));
Signature of above function is...
BOOL WmCpyDta_GetMessage_sTagData(HWND hAcceptFrom, HWND hIdOfSender, const LPARAM lMsgStructure,
char szTag[], char szData[]);
Please suggest.
Thanks
PanB
|
|
|
|
|
wchar_t is not equal to char , hopefully you know that. If you don't nothing I say here is going to help you. So the next thing you do is this[^]
|
|
|
|
|
The obvious implication of the error message is that strTag is a wide string (I suspect strData will be as well).
You'll probably be wanting to look at a function to convert wide strings to ASCII ones[^]...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Simply Great !!! Thanks Buddy.
|
|
|
|
|
You should really avoid pickpockets and CString::GetBuffer (unless, for the latter, you've a special licence from Mark Salsbery).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi
in static texts of the main dialog of my MFC program i've used greek letters like mu, eta, delta, etc. they're displayed properly in resource editor of vs2008. but in runtime they're altered. epsilon is converted to e, delta to d and eta to ?. it's interesting that mu is shown as is.
why is it and how can i resolve it?
thx
|
|
|
|