refactor: migrate project from C++ to Rust
- establish basic Rust project layout. - move all old code into independent directory.
This commit is contained in:
60
legacy/wfassoc/wfassoc_core.h
Normal file
60
legacy/wfassoc/wfassoc_core.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user