|
Hi everyone
Can you give give me a good tutorial about make device driver of course maybe you will be say that codeproject has articles about make it or if you use of google you can find a lot info about it but I want to start of first,what is device driver and then start to writing code?
Thanks
|
|
|
|
|
1) You have to install WDK (Windows Driver Kit) to compile the source code. Visual Studio (Visual C++) is not able to make device drivers (unless you install some third-party add-on to Visual C++).
2) Different type of device drivers require different callback functions. For example, a card reader driver has different callbacks from what a SCSI miniport driver has.
Maxwell Chen
|
|
|
|
|
Can you give me abour device driver what is it and I have VS2005 does it perfect for make it?
Thanks
|
|
|
|
|
messages wrote: abour device driver what is it
A device driver is to control a hardware device.
messages wrote: I have VS2005 does it perfect for make it?
No, VS2005 is useless to make a device driver. (But is good to view source code.)
You have to get a copy of WDK and install it. It will brought you some shortcuts to open DOS-box command-line environments for you to compile the source code.
Windows Driver Kit Homepage[^]
Maxwell Chen
|
|
|
|
|
|
Last year I can find some articles which is written for beginners. After upgrade those articles are missing. Who can tell me how to find them?
There is a will,there is a way!
|
|
|
|
|
What article or articles you need to see?
|
|
|
|
|
I downloaded a sample program in codeproject.com last year. I can’t find the article along with it.The demo project is named “TreePropSheetDemo”. Can you help me find it or tell me how to find it?
There is a will,there is a way!
|
|
|
|
|
(Sorry my system is having problem pasting URLs.)
Tree property sheet
http://www.codeproject.com/KB/tabs/treepropsheet.aspx
Tree property sheet Ex
http://www.codeproject.com/KB/tabs/treepropsheetex.aspx
Maxwell Chen
|
|
|
|
|
Thanks a lot!
There is a will,there is a way!
|
|
|
|
|
I have on Claas that whitin one of the methods/function references
a public method/function of another Class
Does referenced class method have to be static
Truth is I want only one instance of the Referenced Class
I guess its not possible to use the static attribute before the Class Keyword
The only to make The Entire Class Static is to make every member/fuction static
|
|
|
|
|
Do you mean this?
class Object
{
public:
Object() { }
type Test() { }
};
static Object obj;
#include "some.h"
extern static Object obj;
class Invoker
{
public:
type UseStaticObj() { return ::obj.Test(); }
};
Maxwell Chen
|
|
|
|
|
I understand the only way to implement the Class as static is When actually declare it as a Object
I was getting compile errors when I was writting the code for the Class
Referencing a Method Class b from a e.g.
CLass A
{
private:
int c;
char d;
public:
int e()
{
return c;
}
}
Class b
{
private:
public:
int f;
f = getc() // compile error because the compiler wouldn't
{ // know what instance of e I want unless I declare it
e(); // static right ????
}
}
|
|
|
|
|
Fornow I dont understand the question completely, but fornow I can say you something.
First be clear on your design.
You want the referenced class to be single instanced all across the world?
If so , it has to be a singleton.
Or, if you just want the referenced class to be single instanced with the referencing class. It can simply be a static object inside the referencing class.
Note: To use it as a static object, you dont need to use "static" key with the referenced class. Grrrr. It just needs to be prefixed with the object in the referencing class.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Hope this code better explains what my I am trying to do
CLass A
{
private:
int c;
char d;
public:
int e()
{
return c;
}
}
Class b
{
private:
public:
int f;
f = getc() // compile error because the compiler wouldn't
{ // know what instance of e I want unless I declare it
e(); // static right ????
}
}
|
|
|
|
|
Hey!! What are you trying to do??
Class b
{
private:
public:
int f;
f = getc() // compile error because the compiler wouldn't
{ // know what instance of e I want unless I declare it
e(); // static right ????
}
}
f = getc();
e();
And finally, take a good c++ book it's all there in the third page.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Thank you
I understand as you can tell I Am just starting to code in OO
|
|
|
|
|
ok no probs! But what I suggested was that you should start from basics then look at complex stuff otherwise you'll waste a lot of time getting puzzled.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
I think I am begining to understand
A class is really a typedef not real storage only when you declare that object then storage is allocated
If you have a object you want to modify e,g, add you derive that Class
you can access private data members in the derived class by writting your own constructer for it
When you derive it as you stated and use a function/data from derived object the compiler is not confused which instance it the this-> instance
I think I have a better understanding
|
|
|
|
|
VA_ wrote: And finally, take a good c++ book it's all there in the third page.
"The third page" ?!
Maxwell Chen
|
|
|
|
|
Yeah the first two being the "Contents" and "Preface"
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
By chance you are talking about something like :
#include <iostream>
using namespace std;
class one
{
private:
int x;
public:
one(int x_in)
{
cout<<"\n Created only once";
x = x_in;
}
void print()
{
cout<<"\n"<<x;
}
};
class two
{
int y;
public:
two()
{
y=10;
}
void printTest()
{
for(int i=0;i<=10;i++)
{
static one oneObj(y);
y++;
oneObj.print();
}
}
};
int main(int argc, char* argv[])
{
two twoObj;
twoObj.printTest();
return 0;
}
Otherwise you just need a singleton.
ReadHere[^]
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|
|
Hello Gurus
I've stack in my try to convert this:
CDialog *m_Dialog[2];
Into this:
CArray<CDialog *, CDialog *> dlgArray;
I just want to be more flexible.But when I use it by this way:
for(int nCount=0; nCount < m_nPageCount; nCount++)<br />
dlgArray.GetAt(nCount)->Create(m_DialogPages[nCount],GetParent());
I receive an exeption. I think that my mistake is in the template, but I can't solve it. Thanks.
|
|
|
|
|
I don't know if the mistake is in the template. It is not apparent in the posted code. I suggest you to post the exception received and other relevant code (for instance CArray elements assignment.
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.
[my articles]
|
|
|
|
|
For debugging this kinda code , First do like :
<br />
for(int nCount=0; nCount < m_nPageCount; nCount++)<br />
{<br />
dlgArray.GetAt(nCount);<br />
}<br />
This confirms that you can iterate through the container without any problem. If it runs fine, then try :
<br />
for(int nCount=0; nCount < m_nPageCount; nCount++)<br />
{<br />
dlgArray.GetAt(nCount)->Create(m_DialogPages[nCount],GetParent());<br />
}<br />
Then post the actual error message.
OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus
Best wishes to Rexx[^]
|
|
|
|