Here's an example of how to embed a DLL and use it:

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);

// ...

HMODULE hModule = LoadLibrary(_T("Z:\\DLL1.dll"));

typedef void (WINAPI *P_Function)();
P_Function pFunction = (P_Function)GetProcAddress(hModule, "Function");

pFunction();

FreeLibrary(hModule);