Ola,
Gostaria de ajuda com o vbs2010, nececito montar uma call de loadlib com todas as dependencias do crossfire.exe.
Apos pesquisar muito na internet, e tentar por diversos modos achei este e mais alguns modelos que estou tentando atualizar, porem nao estou conseguindo montar os cabecalhos stdio.h
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
// A simple program that uses LoadLibrary and
// GetProcAddress to access myPuts from Myputs.dll.
#include <windows.h>
#include <stdio.h>
typedef int (__cdecl *MYPROC)(LPWSTR);
int main( void )
{
HINSTANCE hinstLib;
MYPROC ProcAdd;
BOOL fFreeResult, fRunTimeLinkSuccess = FALSE;
// Get a handle to the DLL module.
hinstLib = LoadLibrary(TEXT("crossfire.exe"));
// If the handle is valid, try to get the function address.
if (hinstLib != NULL)
{
ProcAdd = (MYPROC) GetProcAddress(hinstLib, "crossfire");
// If the function address is valid, call the function.
if (NULL != ProcAdd)
{
fRunTimeLinkSuccess = TRUE;
(ProcAdd) (L"Message sent to the DLL function\n");
}
// Free the DLL module.
fFreeResult = FreeLibrary(hinstLib);
}
// If unable to call the DLL function, use an alternative.
if (! fRunTimeLinkSuccess)
printf("Message printed from executable\n");
return 0;
}
sei que coisa de iniciante, porem eh exatamente essa minha situacao, e esse forum meu recurso.