Here's an example of how to create a virtual file:

// BoxedAppSDK_CreateVirtualFile creates virtual file
HANDLE hVirtualFile = 
	BoxedAppSDK_CreateVirtualFile(
		_T("C:\\1.swf"), 
		GENERIC_READ, 
		FILE_SHARE_READ, 
		NULL, 
		CREATE_NEW, 
		0, 
		NULL);

// Get pointer to a resource and its size
HMODULE hModule = GetModuleHandle(NULL);
HRSRC hResInfo = FindResource(hModule, _T("BIN1"), _T("BIN"));
HGLOBAL hResData = LoadResource(hModule, hResInfo);
LPVOID lpData = LockResource(hResData);
DWORD dwSize = SizeofResource(hModule, hResInfo);

// Write to just created virtual file
DWORD dwTemp;
WriteFile(hVirtualFile, lpData, dwSize, &dwTemp, NULL);

// Let's close handle
CloseHandle(hVirtualFile);