Tungaalper
asked on
GetUserName WinDDK
There is an example in WinDDK called WatermakrUni. this example add watermark for pcl printer. watermark text is taken from user via user interface of printer proporties.
i want to get username from windows so ican put it on page as watermark. When I try to compile source code with GetUserName function, compiler gives no error or warning.
But when I install plug in it crash instantaly. program say acces vialotion. when it comes to executeion of GetUserName functions. i am sending source code which I edit it
example in the this directory \WinDDK\7600.16385.1\src\p rint\oemdl l\watermar kuni
error message = 0xC0000005: Access violation reading location 0x00000208.
GetUserName((LPWSTR)pOEMUI Param->pOE MOptItems[ 1].pSel,(L PDWORD)(MA X_PATH * sizeof(WCHAR))); // this is the part I added
i want to get username from windows so ican put it on page as watermark. When I try to compile source code with GetUserName function, compiler gives no error or warning.
But when I install plug in it crash instantaly. program say acces vialotion. when it comes to executeion of GetUserName functions. i am sending source code which I edit it
example in the this directory \WinDDK\7600.16385.1\src\p
error message = 0xC0000005: Access violation reading location 0x00000208.
GetUserName((LPWSTR)pOEMUI
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.