|
aaasrgm wrote: But i am doing a project on obtaining these info from system using C functions and Win32 API functions
Setup API is a Win32 API.
Just add:
#include <setupapi.h>
#include <spapidef.h>
#ifdef _MSC_VER
#pragma comment(lib, "Setupapi.lib")
#endif
It will even work from a console application.
Best Wishes,
-David Delaune
|
|
|
|
|
Have a look at this article[^].
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Hey everybody
I'm trying to write a dump using MiniDumpWriteDump(), the function fails with the error 0xD0000022.
I'm trying to find out what that error means, but I can't find anything about that error code.
Does anyone know what it means?
Thanks!
|
|
|
|
|
Did you see this in MSDN?
Return Values
If the function succeeds, the return value is TRUE; otherwise, the return value is FALSE. To retrieve extended error information, call GetLastError. Note that the last error will be an HRESULT value.
If the operation is canceled, the last error code is HRESULT_FROM_WIN32(ERROR_CANCELLED).
Perhaps you should call GetLastError
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Hey, thanks!
And yeah, I did saw it...
Finally I found someone who asked about this problem (in another forum).
He said that newer versions of dbghelp.dll must be used (it seems I didn't use the latest version).
More over, that for full dump (what I want), if the OS failed to make a screenshot, it auto-retries and if failed again,
it simply fails the who process.
|
|
|
|
|
Alternatively, pause your application from within visual studio (I'm assuming that's your IDE of choice) and add a new watch value of "@err, hr"
|
|
|
|
|
Hello everyone,
I am writing a managed console application which will invoke native C++ COM DLL on Windows Server 2003 x64 using PIA interop. The managed console application is built for "Mixed Platform" debug version and the native COM DLL is built for x64 debug version. I am using interop to invoke method from managed code which are exposed from COM code.
I find creating a COM coclass object in managed code is ok, and it is also ok to call some methods of COM coclass from managed code using the created coclass object instance. But when I call into a specific method Abc (Abc is implemented/exposed in COM DLL) from my managed code (FooImpl.dll), there is exception like this, I am so confused that I did not write any method called "XmlSerializers". Any ideas to debug further?
(FooImpl is my managed code DLL which will call COM native code, my managed code console application linked with FooImpl.dll.)
--------------------
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in FooImpl.dll
Additional information: Could not load file or assembly 'FooImpl.XmlSerializers, Version=1.0.1121.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
The system cannot find the file specified.
--------------------
regards,
George
|
|
|
|
|
George_George wrote: An unhandled exception of type 'System.IO.FileNotFoundException'
It seems you dont have the file and it refers to it.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Thanks Hamid,
I finally found the root cause is, the application is built for mixed platforms and the DLL is built for x64. When I change them both to x64, it is fine.
regards,
George
|
|
|
|
|
Thanks for your answer.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Glad to share experience.
regards,
George
|
|
|
|
|
i am writing some code in c like
while(1)
{
printf("Hello");
}
how can i display in the same in an edit box using vc++
thanks
|
|
|
|
|
l_d wrote: how can i display in the same in an edit box using vc++
Use SetWindowText() .
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
But i want to diplay in while(1) i.e
infinite loop which i am not able to do.
|
|
|
|
|
/*
Assumes a Visual C++ 6.0 wizard generated dialog based application
with a multiline edit control.
*/
// .h file
CEdit m_editControl;
UINT m_Timer;
// .cpp file
BOOL CTest263Dlg::OnInitDialog()
{
CDialog::OnInitDialog();
// ****************************
// Other wizard generated code
// ****************************
// TODO: Add extra initialization here
m_Timer=(UINT)SetTimer(1,100,NULL);
return TRUE;
}
void CTest263Dlg::AddMessage(CString sMessage)
{
sMessage+="\r\n"; // Add carriage return linefeed pair
// Assuming a dialog based app with a multiline edit control
m_editControl.SetSel(0,-1);
m_editControl.SetSel(-1,-1); // Set caret to end of existing text
m_editControl.ReplaceSel(sMessage); // Append new message
}
void CTest263Dlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if (nIDEvent==m_Timer) {
AddMessage("I can't frackin' believe that she was the 12th Cylon");
}
CDialog::OnTimer(nIDEvent);
}
|
|
|
|
|
bob16972 wrote: AddMessage("I can't frackin' believe that she was the 12th Cylon");
This signature was proudly tested on animals.
|
|
|
|
|
|
l_d wrote: ...which i am not able to do.
Why not?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi,
If I wanted to have a window that was a custom shape, e.g. a circle, how could I make the regions of the window that I do not want to see transparent?
|-------------|
|---/ \---|
|--| |--|
|--| |--|
|---\ /---|
|-------------|
Lame diagram, but I would like to make the areas composed of dashes transparent so that only the circular area of the window remains visible.
Thanks
|
|
|
|
|
|
An alternative to using window regions is to use layered windows[^].
p.s: You get 10 bonus points for the ASCII art.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Probably you replied to the wrong post.
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]
|
|
|
|
|
Oups, sorry about that.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks guys, I'll have a look!
|
|
|
|
|
Using CStdioile::WriteString, the Unicode string (having Chinese characters) is not writing into a file.. any suggestions?
|
|
|
|