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\print\oemdll\watermarkuni
error message = 0xC0000005: Access violation reading location 0x00000208.
GetUserName((LPWSTR)pOEMUIParam->pOEMOptItems.pSel,(LPDWORD)(MAX_PATH * sizeof(WCHAR))); // this is the part I added