Processing
 

Using custom Win32 DLL from Windows 8 (x86/x64, no RT) app

29/07/2016 15:41#1

Joined at: 7 months ago

Post: 1

Thank: 0

Thanked: 0

My app should use an external win32 DLL (developed for Windows 7). I didn't received yet from my customer, meanwhile i tried to do a simple Windows 8 app with Visual Studio 2015 which load winscard.dll.

Functions i wrapped by DllImport. to obtain a smarcard readers list, are:

    [DllImport("winscard.dll", SetLastError = true)]     internal static extern int SCardEstablishContext(UInt32 dwScope,     IntPtr pvReserved1,     IntPtr pvReserved2,     IntPtr phContext);      [DllImport("winscard.dll", SetLastError = true)]     internal static extern int SCardListReaders(IntPtr hContext,     [MarshalAs(UnmanagedType.LPTStr)] string mszGroups,     IntPtr mszReaders,     out UInt32 pcchReaders);      [DllImport("winscard.dll", SetLastError = true)]     internal static extern int SCardReleaseContext(IntPtr hContext);      [DllImport("winscard.dll", SetLastError = true)]     internal static extern int SCardIsValidContext(IntPtr hContext); 

All works correctly and i can list smartcard readers plugged in my pc.

Will i have issue issuing a customized Win32 DLL? Maybe for publishing to the Windows Store?

UPDATE

Reading this post PInvoke in Metro Apps with Windows 8 / WinRT

P/Invoke and COM Interop are most certainly supported for .NET Metro apps. Win32 API is also supported, and can be called through the above technologies, though it is limited to those functions that are available to Metro apps (i.e. if a C++ Metro app can't call it, neither can a .NET app).

I will update this post when customer dll will be available.

Similar articles

Window Registry create key not working in java

5 months ago - Reply: 1 - Views: 75

Metro App crash on Windows 10

6 months ago - Reply: 2 - Views: 116

.dll file missing after php upgrade

6 months ago - Reply: 1 - Views: 48

Notepad++ launch multiple HTML within browser

6 months ago - Reply: 0 - Views: 3

Access 2003 freezing

6 months ago - Reply: 0 - Views: 2

Icon Handler Shell Extension not called

6 months ago - Reply: 1 - Views: 23

Border color of combox does not change - Windows 8

7 months ago - Reply: 3 - Views: 140

VB.NET error DatagridViewCellValueChanged Windows 8

7 months ago - Reply: 1 - Views: 40

I made a mistake when installing Hyper-V [on hold]

7 months ago - Reply: 0 - Views: 8

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re