- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is the scenario that I am working with. I have a 64 bit kernel mode driver project that I'm compiling and building in Visual Studio 2019 community with the target OS being windows 8.1 64 bit. This project contains an MyASM.asm file which in turn has a single assembly function defined (see below). The project compiles and builds successfully. So far so good. Now the problem that I'm having is when I try calling this single assembly function from main.cpp file the system crashes by freezing and locking up no BSOD. What can be causing this to happen ? Have I got the syntax correct for the .asm file am I missing anything ?
================================= MyASM.asm file ==================================== EXTERN DbgPrint:PROC .data dbgString byte "ATest() routine has been CALLED!\n", 0 .code main PROC main ENDP ATest PROC PUBLIC ;MOV RDX, Offset dbgString ;PUSH [RDX] ;CALL DbgPrint ;POP RDX ;***check to see if DbgPrintEx cleans up the stack*** ;RET SUB RSP, 40h MOV RCX, offset dbgString CALL DbgPrint ADD RSP, 40h RET ATest ENDP END ============================== main.cpp file ============================== extern "C" void ATest(void); NTSTATUS DriverEntry( _In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegistryPath) { // NTSTATUS variable to record success or failure NTSTATUS status = STATUS_SUCCESS; status = ByePgInitialize(SystemWideExceptionHandler, TRUE); if (!NT_SUCCESS(status)) return status; // Allocate the driver configuration object WDF_DRIVER_CONFIG config; // Print "Hello World" for DriverEntry //KdPrintEx((DPFLTR_IHVDRIVER_ID, DPFLTR_INFO_LEVEL, "KmdfHelloWorld: DriverEntry\n")); // Initialize the driver configuration object to register the entry point for the // EvtDeviceAdd callback, KmdfHelloWorldEvtDeviceAdd WDF_DRIVER_CONFIG_INIT(&config, KmdfHelloWorldEvtDeviceAdd ); // Finally, create the driver object status = WdfDriverCreate(DriverObject, RegistryPath, WDF_NO_OBJECT_ATTRIBUTES, &config, WDF_NO_HANDLE ); if (status != STATUS_SUCCESS) return STATUS_UNSUCCESSFUL; else ATest(); }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thank you for posting in Intel Communities.
Could you please provide us with the below details to investigate more on your issue?
- Complete sample reproducer code (include header section in code) or Complete Code as a Zip file if it is not confidential.
- Steps to reproduce your issue.
- The exact version of Visual Studio 2019.
- The version of the compiler you are using.
We can see that you are using Windows 8.1 which is not a supported target OS according to Intel® C++ Compiler Classic System Requirements & Intel® oneAPI DPC++/C++ Compiler System Requirements
We recommend you try again on any one of the supported Windows target OS.
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We haven't heard back from you. Could you please provide an update on your issue? Also, please provide all the details that we requested in the above post.
Thanks & Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We have not heard back from you. This thread will no longer be monitored by Intel. If you need further assistance, please post a new question.
Thanks & Regards,
Santosh

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page