Hello, Habrovca and Khabrovcans!
I am the main developer of the
boxedapp.com project and I would like to tell a little about it, because for some reason, very few Russian-speaking users are interested in our development.
Surely many have heard of thinstall. It is a tool that allows you to pack exe along with all the files and registry keys that it requires in a single exe, which you can then run anywhere.
')
We decided to create something similar, but directly for developers. A kind of SDK that allows you to create virtual files, registry keys, etc.
And, actually, why this may be required?
For example, we have several dll-ek, which are used in the program. The task is to continue their use, but to hide the fact of the presence of these files. The option to save dlls in TEMP is not good - ugly, it may not be enough rights, but you never know. Using BoxedApp, you can create a virtual file with a DLL, load content into it (from anywhere):
HANDLE hFile__DLL1 = BoxedAppSDK_CreateVirtualFile( _T("Z:\\DLL1.dll"), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, 0, NULL ); DWORD dwTemp; WriteFile(hFile__DLL1, pBuffer, dwSize, &dwTemp, NULL); CloseHandle(hFile__DLL1);
HANDLE hFile__DLL1 = BoxedAppSDK_CreateVirtualFile( _T("Z:\\DLL1.dll"), GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_NEW, 0, NULL ); DWORD dwTemp; WriteFile(hFile__DLL1, pBuffer, dwSize, &dwTemp, NULL); CloseHandle(hFile__DLL1);
Now we use dll-ku, as if it really existed:
HMODULE hModule = LoadLibrary(_T("Z:\\DLL1.dll")); typedef void (WINAPI *P_Function)(); P_Function pFunction = (P_Function)GetProcAddress(hModule, "Function"); pFunction(); FreeLibrary(hModule);
HMODULE hModule = LoadLibrary(_T("Z:\\DLL1.dll")); typedef void (WINAPI *P_Function)(); P_Function pFunction = (P_Function)GetProcAddress(hModule, "Function"); pFunction(); FreeLibrary(hModule);
This is a simple example.
Much more interesting when we want to use ActiveX, but for several reasons we can not deploy it on a client computer. For example, we write so-called. portable application. And here BoxedApp can help:
void CreateVirtualFlashOCX() { LPVOID pBuffer; DWORD dwSize; ... HANDLE hVirtualFile1 = BoxedAppSDK_CreateVirtualFile( _T("C:\\Flash9e.ocx"), GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_NEW, 0, NULL); DWORD dwTemp; WriteFile(hVirtualFile1, pBuffer, dwSize, &dwTemp, NULL); CloseHandle(hVirtualFile1); BoxedAppSDK_RegisterCOMLibraryInVirtualRegistry(_T("C:\\Flash9e.ocx")); }
void CreateVirtualFlashOCX() { LPVOID pBuffer; DWORD dwSize; ... HANDLE hVirtualFile1 = BoxedAppSDK_CreateVirtualFile( _T("C:\\Flash9e.ocx"), GENERIC_READ, FILE_SHARE_READ, NULL, CREATE_NEW, 0, NULL); DWORD dwTemp; WriteFile(hVirtualFile1, pBuffer, dwSize, &dwTemp, NULL); CloseHandle(hVirtualFile1); BoxedAppSDK_RegisterCOMLibraryInVirtualRegistry(_T("C:\\Flash9e.ocx")); }
BoxedAppSDK_RegisterCOMLibraryInVirtualRegistry loads the module specified as an argument and registers it in the virtual registry. The real registry does not change, and all changes are saved locally within the current process. When some function later calls CoCreateInstance, and from the depths of the subsystem's COM, the registry will be accessed - BoxedApp will provide the necessary keys, and the COM object will be successfully created.
BoxedApp can still very much (for example, pack .net runtime), but will be able to even more :)
If you have read it, thank you for your attention!