first commit
This commit is contained in:
43
wfassoc/wfassoc.c
Normal file
43
wfassoc/wfassoc.c
Normal file
@ -0,0 +1,43 @@
|
||||
#include "wfassoc.h"
|
||||
#include <strsafe.h>
|
||||
|
||||
#define LEGACY_PROGID_FORMATA "%s.%s.%d"
|
||||
#define LEGACY_PROGID_FORMATW L"%s.%s.%d"
|
||||
|
||||
WFERROR WFInstallApplicationW(WFAPP_PROFILEW* profile) {
|
||||
return WFERROR_OK;
|
||||
}
|
||||
|
||||
WFERROR WFInstallApplicationA(WFAPP_PROFILEA* profile) {
|
||||
return WFERROR_OK;
|
||||
}
|
||||
|
||||
WFERROR WFUninstallApplicationW(WFAPP_PROFILEW* profile) {
|
||||
return WFERROR_OK;
|
||||
}
|
||||
|
||||
WFERROR WFUninstallApplicationA(WFAPP_PROFILEA* profile) {
|
||||
return WFERROR_OK;
|
||||
}
|
||||
|
||||
WFERROR WFGenerateProgIDW(WCHAR* vendor, WCHAR* component, INT version, WCHAR* result, INT* result_length) {
|
||||
if (result_length == NULL) return WFERROR_NULLPTR;
|
||||
if (result == NULL) {
|
||||
*result_length = _snwprintf(NULL, 0, LEGACY_PROGID_FORMATW, vendor, component, version) + 1;
|
||||
} else {
|
||||
int write_result = _snwprintf(result, *result_length, LEGACY_PROGID_FORMATW, vendor, component, version);
|
||||
if (write_result < 0 || write_result >= *result_length) return WFERROR_INSUFFICIENT_BUFFER;
|
||||
}
|
||||
return WFERROR_OK;
|
||||
}
|
||||
|
||||
WFERROR WFGenerateProgIDA(CHAR* vendor, CHAR* component, INT version, CHAR* result, INT* result_length) {
|
||||
if (result_length == NULL) return WFERROR_NULLPTR;
|
||||
if (result == NULL) {
|
||||
*result_length = _snprintf(NULL, 0, LEGACY_PROGID_FORMATA, vendor, component, version) + 1;
|
||||
} else {
|
||||
int write_result = _snprintf(result, *result_length, LEGACY_PROGID_FORMATA, vendor, component, version);
|
||||
if (write_result < 0 || write_result >= *result_length) return WFERROR_INSUFFICIENT_BUFFER;
|
||||
}
|
||||
return WFERROR_OK;
|
||||
}
|
Reference in New Issue
Block a user