1
0
Files
wfassoc/legacy/wfassoc/wfassoc_core.h
yyc12345 e06fcdf53b refactor: migrate project from C++ to Rust
- establish basic Rust project layout.
- move all old code into independent directory.
2025-10-04 22:04:30 +08:00

61 lines
2.9 KiB
C

#if !defined(_YYCDLL_WFASSOC_H__IMPORTED_)
#define _YYCDLL_WFASSOC_H__IMPORTED_
#include <Windows.h>
#include <sal.h>
#include "wfassoc_utils.h"
// quick marco for developer and should not be used in wfassoc self
//#if defined(_UNICODE)
//#define WFAPP_PROFILE WFAPP_PROFILEW
//#define WFInstallApplication WFInstallApplicationW
//#define WFUninstallApplication WFUninstallApplicationW
//#define WFGenerateProgID WFGenerateProgIDW
//#elif defined(_MBCS)
//#define WFAPP_PROFILE WFAPP_PROFILEA
//#define WFInstallApplication WFInstallApplicationA
//#define WFUninstallApplication WFUninstallApplicationA
//#define WFGenerateProgID WFGenerateProgIDA
//#endif
/// <summary>
/// Install Application via Wide Character
/// </summary>
/// <param name="profile"></param>
/// <returns></returns>
WFERROR WFInstallApplication(WFAPP_PROFILE* profile);
WFERROR WFUninstallApplication(WFAPP_PROFILE* profile);
WFERROR WFRegisterAppPath(WFAPP_INTERNAL_PROFILE* internal_profile);
WFERROR WFRegisterApplication(WFAPP_INTERNAL_PROFILE* internal_profile);
WFERROR WFRegisterExtensions(WFAPP_INTERNAL_PROFILE* internal_profile);
//WFERROR WFProfile_Alloc(WFAPP_PROFILE** profile);
//WFERROR WFProfile_Free(WFAPP_PROFILE* profile);
//WFERROR WFProfile_SetProgIDA(WFAPP_PROFILE** profile, char* vendor, char* component, uint32_t version, BOOL is_utf8);
//WFERROR WFProfile_SetProgIDW(WFAPP_PROFILE** profile, wchar_t* vendor, wchar_t* component, uint32_t version);
/// <summary>
/// Generate Legacy ProgID
/// </summary>
/// <param name="vendor">Vendor. Such as `Word`, `Excel`, `PowerPoint`.</param>
/// <param name="component">Component. Such as `Document`, `Sheet`, `Diagram`.</param>
/// <param name="version">Version. Such as `0`, `1`, `114514`.</param>
/// <param name="result">Pointer to output ProgID. If this variable is NULL, function will calculate proper length of receiving buffer and return it via `result_length`.</param>
/// <param name="result_length">Pointer to a int variable containing buffer's length. If `result` is not NULL, it should be the length of `result`.</param>
/// <returns></returns>
//WFERROR WFGenerateProgIDW(WCHAR* vendor, WCHAR* component, INT version, WCHAR* result, INT* result_length);
/// <summary>
/// Generate Legacy ProgID
/// </summary>
/// <param name="vendor">Vendor. Such as `Word`, `Excel`, `PowerPoint`.</param>
/// <param name="component">Component. Such as `Document`, `Sheet`, `Diagram`.</param>
/// <param name="version">Version. Such as `0`, `1`, `114514`.</param>
/// <param name="result">Pointer to output ProgID. If this variable is NULL, function will calculate proper length of receiving buffer and return it via `result_length`.</param>
/// <param name="result_length">Pointer to a int variable containing buffer's length. If `result` is not NULL, it should be the length of `result`.</param>
/// <returns></returns>
//WFERROR WFGenerateProgIDA(CHAR* vendor, CHAR* component, INT version, CHAR* result, INT* result_length);
#endif