Posts

Showing posts with the label winapi

Is there any SDK provided by Microsoft for network application development?

Image
Clash Royale CLAN TAG #URR8PPP Is there any SDK provided by Microsoft for network application development? I am writing a Network program, and I am using NP_ENUM_NETWORK in my win32 application. When I search in my system I am not able to locate this enum. Can I know in which header file, I will get this enum? Is there any SDK provided by Microsoft for network application development where I can get this enum? 1 Answer 1 It seems that your desired functionality, headers and examples are part of any Vista and above SDK. And note, the naming of the SDK tells you what new things it supports. Older OS' continue to be supported (assuming you define the right version macros before including headers). – Richard Jul 1 '09 at 11:48 ...

GDI/GDI+ interoperability and clipping

Image
Clash Royale CLAN TAG #URR8PPP GDI/GDI+ interoperability and clipping I am trying to draw text using Uniscribe in an application that uses GDI+ so I call Graphics::GetHDC and then use the returned HDC for calling ScriptTextOut . I noticed that setting a clip (through Graphics::SetClip ) or a transformation before calling Graphics::GetHDC does not affect the text. So how do I make GDI respect the clipping region and transformation that I set in GDI+? Graphics::GetHDC HDC ScriptTextOut Graphics::SetClip Graphics::GetHDC By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Smart Card APIs throw First Chance exceptions but program runs fine

Image
Clash Royale CLAN TAG #URR8PPP Smart Card APIs throw First Chance exceptions but program runs fine INTRODUCTION I am learning how to use Smart Card API in order to obtain card number once it gets inserted into reader. So far I have managed to create a working application that runs (as far as I can see) without errors. PROBLEM During debugging I see various First chance exceptions, but every Smart Card API returns SCARD_S_SUCCESS and program never crashes nor exhibits any other erroneous behavior. SCARD_S_SUCCESS RELEVANT INFORMATION #include <Windows.h> #include <iostream> #include <iomanip> #include <winscard.h> #pragma comment(lib, "Winscard.lib") void f() // helper that transforms error code to meaningful message { LPSTR s = NULL; if (::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, ::GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), s...