custom.c (1fa71cf3) custom.c (dfdb6d10)
1/*
2 * Custom Action processing for the Microsoft Installer (msi.dll)
3 *
4 * Copyright 2005 Aric Stewart for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 523 unchanged lines hidden (view full) ---

532 LPWSTR dll = NULL;
533 LPSTR proc = NULL;
534 HANDLE hModule;
535 INT type;
536 UINT r;
537
538 TRACE("%s\n", debugstr_guid( guid ));
539
1/*
2 * Custom Action processing for the Microsoft Installer (msi.dll)
3 *
4 * Copyright 2005 Aric Stewart for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 523 unchanged lines hidden (view full) ---

532 LPWSTR dll = NULL;
533 LPSTR proc = NULL;
534 HANDLE hModule;
535 INT type;
536 UINT r;
537
538 TRACE("%s\n", debugstr_guid( guid ));
539
540 status = RpcStringBindingComposeW(NULL, ncalrpcW, NULL, endpoint_lrpcW, NULL, &binding_str);
541 if (status != RPC_S_OK)
540 if (!rpc_handle)
542 {
541 {
543 ERR("RpcStringBindingCompose failed: %#x\n", status);
544 return status;
542 status = RpcStringBindingComposeW(NULL, ncalrpcW, NULL, endpoint_lrpcW, NULL, &binding_str);
543 if (status != RPC_S_OK)
544 {
545 ERR("RpcStringBindingCompose failed: %#x\n", status);
546 return status;
547 }
548 status = RpcBindingFromStringBindingW(binding_str, &rpc_handle);
549 if (status != RPC_S_OK)
550 {
551 ERR("RpcBindingFromStringBinding failed: %#x\n", status);
552 return status;
553 }
554 RpcStringFreeW(&binding_str);
545 }
555 }
546 status = RpcBindingFromStringBindingW(binding_str, &rpc_handle);
547 if (status != RPC_S_OK)
548 {
549 ERR("RpcBindingFromStringBinding failed: %#x\n", status);
550 return status;
551 }
552 RpcStringFreeW(&binding_str);
553
554 r = remote_GetActionInfo(guid, &type, &dll, &proc, &remote_package);
555 if (r != ERROR_SUCCESS)
556 return r;
557
558 hModule = LoadLibraryW( dll );
559 if (!hModule)
560 {

--- 31 unchanged lines hidden (view full) ---

592 ERR("GetProcAddress(%s) failed\n", debugstr_a(proc));
593
594 FreeLibrary(hModule);
595
596 MsiCloseHandle(hPackage);
597 midl_user_free(dll);
598 midl_user_free(proc);
599
556
557 r = remote_GetActionInfo(guid, &type, &dll, &proc, &remote_package);
558 if (r != ERROR_SUCCESS)
559 return r;
560
561 hModule = LoadLibraryW( dll );
562 if (!hModule)
563 {

--- 31 unchanged lines hidden (view full) ---

595 ERR("GetProcAddress(%s) failed\n", debugstr_a(proc));
596
597 FreeLibrary(hModule);
598
599 MsiCloseHandle(hPackage);
600 midl_user_free(dll);
601 midl_user_free(proc);
602
600 RpcBindingFree(&rpc_handle);
601
602 return r;
603}
604
605static DWORD WINAPI custom_client_thread(void *arg)
606{
607 static const WCHAR msiexecW[] = {'\\','m','s','i','e','x','e','c','.','e','x','e',0};
608 static const WCHAR argsW[] = {' ','-','E','m','b','e','d','d','i','n','g',' ',0};
609 msi_custom_action_info *info = arg;

--- 842 unchanged lines hidden ---
603 return r;
604}
605
606static DWORD WINAPI custom_client_thread(void *arg)
607{
608 static const WCHAR msiexecW[] = {'\\','m','s','i','e','x','e','c','.','e','x','e',0};
609 static const WCHAR argsW[] = {' ','-','E','m','b','e','d','d','i','n','g',' ',0};
610 msi_custom_action_info *info = arg;

--- 842 unchanged lines hidden ---