Click here to Skip to main content
15,893,668 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Write a matrix to a txt file Pin
David Crow2-Apr-04 4:01
David Crow2-Apr-04 4:01 
GeneralRe: Write a matrix to a txt file Pin
dairiseky2-Apr-04 4:26
dairiseky2-Apr-04 4:26 
GeneralRe: Write a matrix to a txt file Pin
David Crow2-Apr-04 4:56
David Crow2-Apr-04 4:56 
GeneralCTreeCtrl sort parameters getting corrupted Pin
roybrew2-Apr-04 2:17
roybrew2-Apr-04 2:17 
GeneralLoadLibrary Error Pin
JeabJB2-Apr-04 2:07
JeabJB2-Apr-04 2:07 
GeneralRe: LoadLibrary Error Pin
Alexander M.,2-Apr-04 2:13
Alexander M.,2-Apr-04 2:13 
GeneralRe: LoadLibrary Error Pin
JeabJB2-Apr-04 2:29
JeabJB2-Apr-04 2:29 
GeneralRe: LoadLibrary Error Pin
David Crow2-Apr-04 2:56
David Crow2-Apr-04 2:56 
If LoadLibrary() fails, you shouldn't bother doing that other stuff.

HINSTANCE g_hDllXtlPes;
g_hDllXtlPes = LoadLibrary("XtlPes.dll");
if (NULL != g_hDllXtlPes)
{
    typedef LONG (__cdecl *PESDEMUX_ProcessFile)(CHAR*,CHAR*,INT);

    PESDEMUX_ProcessFile pPESDEMUX_ProcessFile;
    CHAR chInFileName[255];
    strcpy(chInFileName, m_csPCFileName); //Conversion CString to CHAR*
    CHAR chOutFileName[255];
    m_csPCFileName = m_csPCFileName + ".mpg";
    strcpy(chOutFileName, m_csPCFileName); //Conversion CString to CHAR*
    INT Type = 1;

    pPESDEMUX_ProcessFile = (PESDEMUX_ProcessFile)GetProcAddress(theApp.g_hDllXtlPes,"PESDEMUX_ProcessFile");
    if (NULL != pPESDEMUX_ProcessFile)
    {
        BOOL BResult;
        BResult = pPESDEMUX_ProcessFile(chInFileName,chOutFileName,Type);
    }
    else
    {
        DWORD dwResult = GetLastError();
        FreeLibrary(theApp.g_hDllXtlUsb);
        return FALSE;
    }
}
else
    DWORD dwResult = GetLastError();
Note the calls to GetLastError().


"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)


GeneralRe: LoadLibrary Error Pin
JeabJB2-Apr-04 3:10
JeabJB2-Apr-04 3:10 
GeneralRe: LoadLibrary Error Pin
David Crow2-Apr-04 3:23
David Crow2-Apr-04 3:23 
GeneralRe: LoadLibrary Error Pin
JeabJB2-Apr-04 3:34
JeabJB2-Apr-04 3:34 
GeneralRe: LoadLibrary Error Pin
David Crow2-Apr-04 3:38
David Crow2-Apr-04 3:38 
GeneralRe: LoadLibrary Error Pin
JeabJB2-Apr-04 3:49
JeabJB2-Apr-04 3:49 
GeneralRe: LoadLibrary Error Pin
David Crow2-Apr-04 4:05
David Crow2-Apr-04 4:05 
Generaliterator Pin
Jerome Conus2-Apr-04 1:53
Jerome Conus2-Apr-04 1:53 
GeneralRe: iterator Pin
Jonas Larsson2-Apr-04 2:12
Jonas Larsson2-Apr-04 2:12 
GeneralRe: iterator Pin
Maxwell Chen2-Apr-04 2:14
Maxwell Chen2-Apr-04 2:14 
GeneralRe: iterator Pin
monrobot132-Apr-04 6:30
monrobot132-Apr-04 6:30 
GeneralCDialogBar problem Pin
Krugger4042-Apr-04 1:53
Krugger4042-Apr-04 1:53 
GeneralCDialogBar problem Pin
Krugger4042-Apr-04 1:52
Krugger4042-Apr-04 1:52 
Generalcout Pin
Oriented2-Apr-04 0:59
Oriented2-Apr-04 0:59 
GeneralRe: cout Pin
Maxwell Chen2-Apr-04 1:19
Maxwell Chen2-Apr-04 1:19 
GeneralRe: cout Pin
Rage2-Apr-04 1:46
professionalRage2-Apr-04 1:46 
GeneralConversion from int to string Pin
gls2ro2-Apr-04 0:20
gls2ro2-Apr-04 0:20 
GeneralRe: Conversion from int to string Pin
Rage2-Apr-04 1:53
professionalRage2-Apr-04 1:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.