Hello,
How do I disconnect an Add-on in Word by my FWH-applicqation which is active at the moment?
Thanks.
#include <windows.h>
int main() {
// Get the handle of the Word application.
HWND word_app = FindWindow(L"Word.Application", NULL);
// Get the handle of the macjuda.dot file.
HMODULE macjuda_dot = LoadLibrary(L"macjuda.dot");
// Disconnect the macjuda.dot file from Word.
DisconnectObject(word_app, macjuda_dot);
return 0;
}
AddIns("C:\Users\Michel\AppData\Roaming\Microsoft\Word\STARTUP\MacJuda.dotm").Installed = False
#include <stdio.h>
#include <windows.h>
int main() {
HKEY hKey;
const char *regPath = "Software\\Microsoft\\Office\\Word\\Addins\\MacJuda.dotm";
if (RegOpenKeyEx(HKEY_CURRENT_USER, regPath, 0, KEY_WRITE, &hKey) == ERROR_SUCCESS) {
DWORD value = 0;
if (RegSetValueEx(hKey, "Installed", 0, REG_DWORD, (const BYTE*)&value, sizeof(DWORD)) == ERROR_SUCCESS) {
printf("Value 'Installed' set to False.\n");
} else {
printf("Error setting value.\n");
}
RegCloseKey(hKey);
} else {
printf("Error opening registry key.\n");
}
return 0;
}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 71 guests