|
Look at the Device Driver articles by Toby Opferman[^]
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
brucewayn wrote: Can you give give me a good tutorial about device driver programming...
This is about as good as it gets.
"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 ,
im using UrlDownloadtofile() to download some files ...but the issue is if the file is present im able to download file(With return value S_OK) ...but if the server is not accessible ie (some issue with IIS or any other..) or if the file is not present im not getting the exact return value from UrlDownloadtofile to specify to user whether it is server issue or File not present...in MSDN it was given that if the return value is INET_E_DOWNLOAD_FAILURE then file is not present in the server but...im getting some junk value like -2146697210...when the file is not present in the server or server is not accessible....
So please let me know how can i notify user what is the exact problem....
|
|
|
|
|
As per the documentation, this function will return, either of the following values,
S_OK - 0
E_OUTOFMEMORY - 0x80000002
INET_E_DOWNLOAD_FAILURE - 0x800C0008
and from the error code you've given the value is negative which means that you're taking this values to a signed variable like int.
The actual return type is HRESULT and the values are defined with unsigned hexadecimal. Please compare it with INET_E_DOWNLOAD_FAILURE, S_OK or E_OUTOFMEMORY to know whether it has succeeded or not.
The error code you've given is close to INET_E_DOWNLOAD_FAILURE value. Please compare against it.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Thanks for ur reply .......i have changed view to Hexadecimal display...and now im getting return value as 0x800C0006...May i know what this return value indicates.....
|
|
|
|
|
p_1960 wrote: May i know what this return value indicates.....
Have you tried errlook.exe?
"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
|
|
|
|
|
May i know from where can i get that exe...?Is it a third party exe..
|
|
|
|
|
p_1960 wrote: May i know from where can i get that exe...?
It comes with Visual Studio.
"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 am doing application in which i want to know whether the Desktop window is the current active window or Not. How can i do this. Is GetForeGroundWindow() is a solution?.
thanks
Nitheesh.
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
Have you tried:
if (GetActiveWindow() == GetDesktopWindow())
...
"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 David,
Thanks for your reply. I tried using the GetForeGroundWindow but that didn't work.
thanks
Nitheesh
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
Assuming you meant GetForegroundWindow() , I don't recall suggesting it.
Anyway, what does it return? Have you compared that window handle with those in Spy++?
"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 David,
I tried by using GetActiveWindow() but MSDN says
"The GetActiveWindow function retrieves the window handle to the active window attached to the calling thread's message queue." . So i am getting NULL when my application's window is not the current window.
Do u have any suggestion?.
thanks.
Nitheesh
Jose Jo Martin
http://www.simpletools.co.in
|
|
|
|
|
Hi all,
i m creating a propertysheet by using a class drived from property sheet.
its works fine but its not move.
please tell me wat can i do.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
"_$h@nky_" wrote: its works fine but its not move.
Which means what?
"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
|
|
|
|
|
How do i write to a text file with out erasing the previous data on the same text file
Dercio@C++
|
|
|
|
|
You should write it in append mode.
like in C++,
include<fstream>
std::ofstream ofs("mtfile.txt",ios::app);
ofs<<"Hi";
ofs.close()
ios::app says it's append mode. But just a question, Do you have a C++ book on hand?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
In the fopen function set the mode parameter to "a" or "a+"
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
why do we sometimes need to pass by reference, a parameter of a function
Dercio@C++
|
|
|
|
|
1.Passing by parameter ensures, you don't create multiple copies.
2.As you don't make copies, it saves memory and be faster.
3.When you change something to the reference, it would mean you are changing the actual object. So serves the purpose.
4. The same can be done using pointers, but reference are better in many ways. The major advantage is that you dont need to check for NULL every time.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
Hello Dercio,
1) To avoid creating unnecessary temporary copy of variable while calling functions.
2) More user friendly method than pointers to get data back from functions. For instance
void GetString( CString& Value )
{
Value = "I've changed the value.";
}
...
CString csString;
GetString( csString );
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Dercio wrote: why do we sometimes need to pass by reference, a parameter of a function
I will answer that question for you if you will answer my question.
Q: Why do people sometimes need to ask questions in internet forums for which there are massive amounts of existing information on the internet and in books which they could choose to read?
|
|
|
|
|
Passing by reference is the sissy's way to pass a pointer.
--The Klingon Programmer
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]
|
|
|
|
|
Then what about reference to pointers? It's still sissy?
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
|
|
|
|
|
It's sissy's silly.
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]
|
|
|
|