Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
3.8 KiB

  1. //
  2. // TheApp.h
  3. //
  4. // Application header for NCONN32.DLL
  5. //
  6. #pragma once
  7. #include "resource.h"
  8. extern HINSTANCE g_hInstance;
  9. typedef DWORD DEVINST;
  10. typedef DWORD DEVNODE;
  11. // 16-bit function prototypes, including thunk connection point
  12. //
  13. extern "C" BOOL WINAPI thk_ThunkConnect32(LPCSTR lpDll16, LPCSTR lpDll32, HINSTANCE hDllInst, DWORD dwReason);
  14. extern "C" DWORD WINAPI CallClassInstaller16(HWND hwndParent, LPCSTR lpszClassName, LPCSTR lpszDeviceID);
  15. extern "C" HRESULT WINAPI FindClassDev16(HWND hwndParent, LPCSTR pszClass, LPCSTR pszDeviceID);
  16. extern "C" HRESULT WINAPI LookupDevNode16(HWND hwndParent, LPCSTR pszClass, LPCSTR pszEnumKey, DEVNODE FAR* pDevNode, DWORD FAR* pdwFreePointer);
  17. extern "C" HRESULT WINAPI FreeDevNode16(DWORD dwFreePointer);
  18. extern "C" HRESULT WINAPI IcsUninstall16(void);
  19. // Binding functions
  20. //
  21. int WINAPI EnumMatchingNetBindings(LPCSTR pszParentBinding, LPCSTR pszDeviceID, LPSTR** pprgBindings);
  22. VOID RemoveBindingFromParent(HKEY hkeyParentBindingsKey, LPCSTR pszBinding);
  23. BOOL WINAPI IsValidNetEnumKey(LPCSTR pszClass, LPCSTR pszDevice, LPCSTR pszEnumSubKey);
  24. BOOL WINAPI FindValidNetEnumKey(LPCSTR pszClass, LPCSTR pszDevice, LPSTR pszBuf, int cchBuf);
  25. int WINAPI EnumNetBindings(LPCSTR pszParentBinding, LPSTR** pprgBindings);
  26. int WINAPI EnumMatchingNetBindings(LPCSTR pszParentBinding, LPCSTR pszDeviceID, LPSTR** pprgBindings);
  27. BOOL WINAPI RemoveBrokenNetItems(LPCSTR pszClass, LPCSTR pszDeviceID);
  28. BOOL GetDeviceInterfaceList(LPCSTR pszClass, LPCSTR pszDeviceID, LPCSTR pszInterfaceType, LPSTR pszBuf, int cchBuf);
  29. BOOL CheckMatchingInterface(LPCSTR pszList1, LPCSTR pszList2);
  30. BOOL GetDeviceLowerRange(LPCSTR pszClass, LPCSTR pszDeviceID, LPSTR pszBuf, int cchBuf);
  31. BOOL GetDeviceUpperRange(LPCSTR pszClass, LPCSTR pszDeviceID, LPSTR pszBuf, int cchBuf);
  32. HRESULT FindAndCloneNetEnumKey(LPCSTR pszClass, LPCSTR pszDeviceID, LPSTR pszBuf, int cchBuf);
  33. HRESULT CloneNetClassKey(LPCSTR pszExistingDriver, LPSTR pszNewDriverBuf, int cchNewDriverBuf);
  34. HRESULT OpenNetEnumKey(CRegistry& reg, LPCSTR pszSubKey, REGSAM dwAccess);
  35. HRESULT DeleteClassKeyReferences(LPCSTR pszClass, LPCSTR pszDeviceID);
  36. BOOL IsNetClassKeyReferenced(LPCSTR pszClassKey);
  37. BOOL WINAPI DoesBindingMatchDeviceID(LPCSTR pszBinding, LPCSTR pszDeviceID);
  38. // Protocol functions
  39. //
  40. BOOL WINAPI IsProtocolBoundToAnyAdapter(LPCSTR pszProtocolID);
  41. HRESULT WINAPI BindProtocolToOnlyOneAdapter(LPCSTR pszProtocolDeviceID, LPCSTR pszAdapterKey, BOOL bIgnoreVirtualNics);
  42. HRESULT WINAPI BindProtocolToAllAdapters(LPCSTR pszProtocolDeviceID);
  43. HRESULT BindProtocolToAdapter(HKEY hkeyAdapterBindings, LPCSTR pszProtocolDeviceID, BOOL bEnableSharing);
  44. // Sharing functions
  45. //
  46. HRESULT WINAPI EnableDisableProtocolSharing(LPCTSTR pszProtocolDeviceID, BOOL bEnable, BOOL bDialUp);
  47. HRESULT WINAPI EnableSharingOnNetBinding(LPCSTR pszNetBinding);
  48. HRESULT WINAPI DisableSharingOnNetBinding(LPCSTR pszNetBinding);
  49. HRESULT CreateNewFilePrintSharing(LPSTR pszBuf, int cchBuf);
  50. HRESULT WINAPI EnableFileSharing();
  51. HRESULT WINAPI EnablePrinterSharing();
  52. // Config manager functions
  53. //
  54. BOOL WINAPI IsNetAdapterBroken(const NETADAPTER* pAdapter);
  55. BOOL WINAPI GetNetAdapterStatus(const NETADAPTER* pAdapter, DWORD* pdwStatus, DWORD* pdwProblemNumber);
  56. DWORD WINAPI GetNetAdapterDevNode(NETADAPTER* pAdapter);
  57. DWORD GetChildDevice(OUT DWORD* pdnChildInst, IN DWORD dnDevInst, IN OUT HINSTANCE *phInstance, IN ULONG ulFlags);
  58. DWORD GetSiblingDevice(OUT DWORD* pdnChildInst, IN DWORD dnDevInst, IN HINSTANCE hInstance, IN ULONG ulFlags);
  59. DWORD GetDeviceIdA(IN DWORD dnDevInst, OUT char** Buffer, OUT ULONG* pLength, IN ULONG ulFlags);
  60. DWORD GetDevNodeRegistryPropertyA(IN DWORD dnDevInst, IN ULONG ulProperty, OUT PULONG pulRegDataType, OUT PVOID Buffer, IN OUT PULONG pulLength, IN ULONG ulFlags);