Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: source code Pin
raj suthar2-Apr-13 7:54
raj suthar2-Apr-13 7:54 
GeneralRe: source code Pin
Chris Losinger2-Apr-13 7:55
professionalChris Losinger2-Apr-13 7:55 
AnswerRe: source code Pin
Richard MacCutchan2-Apr-13 9:19
mveRichard MacCutchan2-Apr-13 9:19 
GeneralRe: source code Pin
Captain Price2-Apr-13 17:02
professionalCaptain Price2-Apr-13 17:02 
QuestionRe: source code Pin
David Crow2-Apr-13 10:34
David Crow2-Apr-13 10:34 
AnswerRe: source code Pin
Peter_in_27802-Apr-13 10:57
professionalPeter_in_27802-Apr-13 10:57 
GeneralRe: source code Pin
Captain Price2-Apr-13 17:04
professionalCaptain Price2-Apr-13 17:04 
AnswerRe: source code Pin
Erudite_Eric3-Apr-13 3:38
Erudite_Eric3-Apr-13 3:38 
QuestionICredentialProviderFilter Pin
venkatesh528672-Apr-13 1:59
venkatesh528672-Apr-13 1:59 
QuestionTesting my first C driver Pin
candogu2-Apr-13 1:44
candogu2-Apr-13 1:44 
AnswerRe: Testing my first C driver Pin
Richard MacCutchan2-Apr-13 1:53
mveRichard MacCutchan2-Apr-13 1:53 
GeneralRe: Testing my first C driver Pin
candogu2-Apr-13 1:58
candogu2-Apr-13 1:58 
QuestionRe: Testing my first C driver Pin
Richard MacCutchan2-Apr-13 2:16
mveRichard MacCutchan2-Apr-13 2:16 
AnswerRe: Testing my first C driver Pin
candogu2-Apr-13 2:22
candogu2-Apr-13 2:22 
GeneralRe: Testing my first C driver Pin
Richard MacCutchan2-Apr-13 2:30
mveRichard MacCutchan2-Apr-13 2:30 
GeneralRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 0:46
Erudite_Eric3-Apr-13 0:46 
GeneralRe: Testing my first C driver Pin
Jochen Arndt2-Apr-13 3:05
professionalJochen Arndt2-Apr-13 3:05 
GeneralRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 3:34
Erudite_Eric3-Apr-13 3:34 
QuestionRe: Testing my first C driver Pin
David Crow2-Apr-13 4:34
David Crow2-Apr-13 4:34 
AnswerRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 0:45
Erudite_Eric3-Apr-13 0:45 
AnswerRe: Testing my first C driver Pin
Erudite_Eric3-Apr-13 0:58
Erudite_Eric3-Apr-13 0:58 
Good job you cant build it because it will BSOD anyway.

You need to do this for starters in DriverEntry:

C++
for (Index = 0 ; Index <= IRP_MJ_MAXIMUM_FUNCTION ; Index++)
{
    DriverObject->MajorFunction[Index] = MyDispatch;
}

DriverObject->DriverExtension->AddDevice            = 0; // non PnP so dont set this

DriverObject->DriverUnload                          = MyUnload;


Your MyDispatch actually needs to do something with the Irps, set Information to 0, the status block to success and return success.



C++
Irp->IoStatus.Status     = STATUS_SUCCESS;
Irp->IoStatus.Information    = 0;
IoCompleteRequest(Irp, IO_NO_INCREMENT);
return STATUS_SUCCESS;



You then need to make sure you are using the DDK (of WDK) compiler, as in actually install the entire DDK (WDK). I dont know what CodeBlocks is, I dont care, the DDK compiler is the one you must use.

You need to get your SORCES file right, look at some of the samples that ship with the DDK (WDK).


You then need a service entry in the registry in order to start your driver, either inf file or do it manually, then start it with 'net srart'.
==============================

Nothing to say.

Questioncode conversion MATLAB to c Pin
Member 99587781-Apr-13 21:12
Member 99587781-Apr-13 21:12 
AnswerRe: code conversion MATLAB to c Pin
Chris Losinger2-Apr-13 7:49
professionalChris Losinger2-Apr-13 7:49 
QuestionAccessing Win32 APIs from WinRT app through Win32 Dll Pin
msr_codeproject1-Apr-13 4:21
msr_codeproject1-Apr-13 4:21 
AnswerRe: Accessing Win32 APIs from WinRT app through Win32 Dll Pin
Richard MacCutchan1-Apr-13 21:37
mveRichard MacCutchan1-Apr-13 21:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.