Skip to content

Commit

Permalink
[PSDK] Fix issues with callback function type declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
EricKohl committed Jul 15, 2023
1 parent d8f9f7f commit 0616df1
Showing 1 changed file with 9 additions and 36 deletions.
45 changes: 9 additions & 36 deletions sdk/include/psdk/netsh.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,71 +7,49 @@ extern "C" {

typedef
DWORD
WINAPI
(GET_RESOURCE_STRING_FN)(
(WINAPI *PGET_RESOURCE_STRING_FN)(
_In_ DWORD dwMsgID,
_Out_ LPWSTR lpBuffer,
_In_ DWORD nBufferMax);

typedef GET_RESOURCE_STRING_FN *PGET_RESOURCE_STRING_FN;

typedef
DWORD
WINAPI
(NS_DLL_INIT_FN)(
(WINAPI *PNS_DLL_INIT_FN)(
_In_ DWORD dwNetshVersion,
_Out_ PVOID pReserved);

typedef NS_DLL_INIT_FN *PNS_DLL_INIT_FN;

typedef
DWORD
WINAPI
(NS_HELPER_START_FN)(
(WINAPI *PNS_HELPER_START_FN)(
_In_ const GUID *pguidParent,
_In_ DWORD dwVersion);

typedef NS_HELPER_START_FN *PNS_HELPER_START_FN;

typedef
DWORD
WINAPI
(NS_HELPER_STOP_FN)(
(WINAPI *PNS_HELPER_STOP_FN)(
_In_ DWORD dwReserved);

typedef NS_HELPER_STOP_FN *PNS_HELPER_STOP_FN;

typedef
DWORD
WINAPI
(NS_CONTEXT_COMMIT_FN)(
(WINAPI *PNS_CONTEXT_COMMIT_FN)(
_In_ DWORD dwAction);

typedef NS_CONTEXT_COMMIT_FN *PNS_CONTEXT_COMMIT_FN;

typedef
DWORD
WINAPI
(NS_CONTEXT_CONNECT_FN)(
(WINAPI *PNS_CONTEXT_CONNECT_FN)(
_In_ LPCWSTR pwszMachine);

typedef NS_CONTEXT_CONNECT_FN *PNS_CONTEXT_CONNECT_FN;

typedef
DWORD
WINAPI
(NS_CONTEXT_DUMP_FN)(
(WINAPI *PNS_CONTEXT_DUMP_FN)(
_In_ LPCWSTR pwszRouter,
_In_ LPWSTR *ppwcArguments,
_In_ DWORD dwArgCount,
_In_ LPCVOID pvData);

typedef NS_CONTEXT_DUMP_FN *PNS_CONTEXT_DUMP_FN;

typedef
BOOL
WINAPI
(NS_OSVERSIONCHECK)(
(WINAPI *PNS_OSVERSIONCHECK)(
_In_ UINT CIMOSType,
_In_ UINT CIMOSProductSuite,
_In_ LPCWSTR CIMOSVersion,
Expand All @@ -81,12 +59,9 @@ WINAPI
_In_ UINT uiReserved,
_In_ DWORD dwReserved);

typedef NS_OSVERSIONCHECK *PNS_OSVERSIONCHECK;

typedef
DWORD
WINAPI
(FN_HANDLE_CMD)(
(WINAPI *PFN_HANDLE_CMD)(
_In_ LPCWSTR pwszMachine,
_In_ LPWSTR *ppwcArguments,
_In_ DWORD dwCurrentIndex,
Expand All @@ -95,8 +70,6 @@ WINAPI
_In_ LPCVOID pvData,
_Out_ BOOL *pbDone);

typedef FN_HANDLE_CMD *PFN_HANDLE_CMD;


typedef struct _CMD_ENTRY
{
Expand Down

0 comments on commit 0616df1

Please sign in to comment.