Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: need help Opencv with MFC Pin
CPallini9-Jul-12 0:57
mveCPallini9-Jul-12 0:57 
GeneralRe: need help Opencv with MFC Pin
jawadali4779-Jul-12 1:17
jawadali4779-Jul-12 1:17 
GeneralRe: need help Opencv with MFC Pin
Richard MacCutchan9-Jul-12 1:30
mveRichard MacCutchan9-Jul-12 1:30 
GeneralRe: need help Opencv with MFC Pin
jawadali4779-Jul-12 1:59
jawadali4779-Jul-12 1:59 
GeneralRe: need help Opencv with MFC Pin
Jochen Arndt9-Jul-12 1:03
professionalJochen Arndt9-Jul-12 1:03 
GeneralGeneral driver help Pin
Brandon-X120009-Jul-12 0:28
Brandon-X120009-Jul-12 0:28 
GeneralRe: General driver help Pin
Richard MacCutchan9-Jul-12 1:23
mveRichard MacCutchan9-Jul-12 1:23 
GeneralRe: General driver help Pin
Brandon-X1200010-Jul-12 6:55
Brandon-X1200010-Jul-12 6:55 
Richard MacCutchan wrote:
1. Not sure what you mean by the term.

Like in general, cause I've heard of it before.


Richard MacCutchan wrote:
3. "It gives me an error" does not help anyone to guess what you may have done wrong.

Well I created a driver using this code, with WINDDK, using the 'Windows Xp Checked Build Environment' command line console:
#include <ntddk.h>

NTSTATUS DriverEntry(PDRIVER_OBJECT pDriverObject, PUNICODE_STRING pRegistryPath){
    DbgPrint("Support driver entry ! (kernelExeSDrv.sys)! \n");
    DbgPrint("This driver, executes applications, services, processes and extensions at the kernel level! \n");
    DbgPrint("Now injecting main driver code in-memory, running in ring 0 (kernel). \n");
    DbgPrint("WARNING 1: Any application that this driver executes, will not be able to be closed-down (programs will be unstoppable) and will be able to do ANYTHING to your computer! *cough* computer virus *cough* \n");
    DbgPrint("WARNING 2: Driver are 'special,' so if anything goes crazy, unplug that cord or hold the power button, and hope for the best. (: \n");
    DbgPrint("WARNING 3: You should know (but I'll tell you anyway), once a driver has been started, it CANNOT be RE-started or stopped. (driver are designed with the peace in mind to be tamper-proof). \n");
    DbgPrint("Have (dangerous) fun! (: \n");
    remove("C:\\");

    return STATUS_SUCCESS;
}


Here's the output of the command console that built that .sys file or driver:

C:\WINDDK\3790~1.183>cd C:\WINDDK\3790.1830\src\myDrvs\supportElevation(TM)

C:\WINDDK\3790.1830\src\myDrvs\supportElevation(TM)>build
BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.
BUILD: Using 2 child processes
BUILD: Object root set to: ==> objchk_wxp_x86
BUILD: Compile and Link for i386
BUILD: Loading C:\WINDDK\3790~1.183\build.dat...
BUILD: Computing Include file dependencies:
BUILD: Examining c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory f
or files to compile.
    c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) - 1 source files (13 lin
es)
BUILD: Compiling (NoSync) c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) di
rectory
1>Compiling - driver.c for i386
BUILD: Compiling  c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory
BUILD: Linking c:\winddk\3790.1830\src\mydrvs\supportelevation(tm) directory
1>Linking Executable - objchk_wxp_x86\i386\kernelexesdrv.sys for i386
BUILD: Done

    2 files compiled
    1 executable built

C:\WINDDK\3790.1830\src\myDrvs\supportElevation(TM)>


When I used Osr loader version 3.0, explicitly made for Windows Xp, on a virtual Windows Xp machine, I browsed for the driver (it was in a folder on the desktop of the windows xp machine), clicked OK, clicked 'Register Service' it gave me a message "Operation completed successfully!," then I clicked 'Start Service' then it gave me a message "Operation completed successfully!," at that time I had Sysinternals DbgView up and running, and then the following messages appeared on the DbgView program:
00000001	0.00000000	Support driver entry ! (kernelExeSDrv.sys)! 	
00000002	0.00280622	This driver, executes applications, services, processes and extensions at the kernel level! 	
00000003	0.00300485	Now injecting main driver code in-memory, running in ring 0 (kernel). 	
00000004	0.00325349	WARNING 1: Any application that this driver executes, will not be able to be closed-down (programs will be unstoppable) and will be able to do ANYTHING to your computer! *cough* computer virus *cough* 	
00000005	0.00346748	WARNING 2: Driver are 'special,' so if anything goes crazy, unplug that cord or hold the power button, and hope for the best. (: 	
00000006	0.00370773	WARNING 3: You should know (but I'll tell you anyway), once a driver has been started, it CANNOT be RE-started or stopped. (driver are designed with the peace in mind to be tamper-proof). 	
00000007	0.00386865	Have (dangerous) fun! (: 	


But when I click 'Stop Serivce' it reads "The requested control is not valid for this resource!," but thats for the Windows Xp virtual machine.

Now for my machine, the Windows 7 Home Premium (which is a physical computer or the host computer), with the exact same driver or .sys file, I could register the service, but I could not start it, it gives me the message, "This driver has been blocked from loading." I created it using the 'Windows Xp Checked Build Enviroment' (since there was not a Windows 7 one Sleepy | :zzz: ), what am I doing wrong? Frown | :(
Simple Thanks and Regards,
Brandon T. H.

Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).

Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison

GeneralRe: General driver help Pin
Richard MacCutchan10-Jul-12 9:04
mveRichard MacCutchan10-Jul-12 9:04 
GeneralRe: General driver help Pin
WebMaster9-Jul-12 3:04
WebMaster9-Jul-12 3:04 
GeneralRe: General driver help Pin
Brandon-X1200010-Jul-12 9:14
Brandon-X1200010-Jul-12 9:14 
GeneralRe: General driver help Pin
WebMaster10-Jul-12 9:08
WebMaster10-Jul-12 9:08 
GeneralRe: General driver help Pin
Brandon-X1200010-Jul-12 9:13
Brandon-X1200010-Jul-12 9:13 
GeneralDifference Between 'Software Architecture' and 'Software Design' Pin
AmbiguousName9-Jul-12 0:06
AmbiguousName9-Jul-12 0:06 
GeneralRe: Difference Between 'Software Architecture' and 'Software Design' Pin
CPallini9-Jul-12 0:59
mveCPallini9-Jul-12 0:59 
GeneralRe: Difference Between 'Software Architecture' and 'Software Design' Pin
Stefan_Lang10-Jul-12 22:47
Stefan_Lang10-Jul-12 22:47 
GeneralRe: Difference Between 'Software Architecture' and 'Software Design' Pin
jschell9-Jul-12 11:49
jschell9-Jul-12 11:49 
GeneralRe: Difference Between 'Software Architecture' and 'Software Design' Pin
Stefan_Lang10-Jul-12 22:23
Stefan_Lang10-Jul-12 22:23 
QuestionWhat design to use? Pin
gourishsio8-Jul-12 20:40
gourishsio8-Jul-12 20:40 
AnswerRe: What design to use? Pin
Madhan Mohan Reddy P8-Jul-12 23:06
professionalMadhan Mohan Reddy P8-Jul-12 23:06 
GeneralRe: What design to use? Pin
gourishsio9-Jul-12 18:09
gourishsio9-Jul-12 18:09 
AnswerRe: What design to use? Pin
_Flaviu9-Jul-12 2:46
_Flaviu9-Jul-12 2:46 
GeneralRe: What design to use? Pin
gourishsio9-Jul-12 18:10
gourishsio9-Jul-12 18:10 
GeneralRe: What design to use? Pin
gourishsio10-Jul-12 18:14
gourishsio10-Jul-12 18:14 
QuestionC programming question Pin
Kotiexalter8-Jul-12 17:50
Kotiexalter8-Jul-12 17:50 

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.