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

Managed C++/CLI

 
GeneralRe: Dll Dependency issue Pin
givinisha27-Apr-12 2:58
givinisha27-Apr-12 2:58 
GeneralRe: Dll Dependency issue Pin
YoavStein28-May-12 4:30
YoavStein28-May-12 4:30 
QuestionHow to compare the strings - unicode vc++2010 ? Pin
Paramu197319-Apr-12 2:05
Paramu197319-Apr-12 2:05 
AnswerRe: How to compare the strings - unicode vc++2010 ? Pin
John Schroedl19-Apr-12 3:12
professionalJohn Schroedl19-Apr-12 3:12 
GeneralRe: How to compare the strings - unicode vc++2010 ? Pin
Paramu197320-Apr-12 20:34
Paramu197320-Apr-12 20:34 
QuestionHow to Declare & Handle the KeyEventArgs for a Sub from a Class ? Pin
Paramu197315-Apr-12 22:19
Paramu197315-Apr-12 22:19 
AnswerRe: How to Declare & Handle the KeyEventArgs for a Sub from a Class ? Pin
Paramu197316-Apr-12 4:42
Paramu197316-Apr-12 4:42 
QuestionConvert C++/CLI code to Visual Studio 2002 Managed C++ Pin
goncri11-Apr-12 10:10
goncri11-Apr-12 10:10 
Can I help to convert the next C++/CLI code to Visual Studio 2002 Managed C++?

C++
bool IsPrinterOk(String ^printerName)
{
    bool bResult=false;
    HANDLE hPrinter;


    IntPtr pPrinterName=Marshal::StringToHGlobalUni(printerName);
    WCHAR *pChar=(WCHAR *)pPrinterName.ToPointer();

    if(::OpenPrinter(pChar,&hPrinter,NULL)==0)
        return false;

    DWORD bytesNeeded;
    ::GetPrinter(hPrinter,2,0,0,&bytesNeeded);
    PRINTER_INFO_2 *pf=(PRINTER_INFO_2 *)GlobalAlloc(GPTR,bytesNeeded);

    if(::GetPrinter(hPrinter,2,(LPBYTE)pf,bytesNeeded,&bytesNeeded)!=0)
        if(pf->cJobs==0 && pf->Status==0)
            bResult=true;

    GlobalFree(pf);

    ClosePrinter(hPrinter);

    return bResult;
}


What changes must be made in the code?

Thanks.
AnswerRe: Convert C++/CLI code to Visual Studio 2002 Managed C++ Pin
Richard MacCutchan11-Apr-12 22:20
mveRichard MacCutchan11-Apr-12 22:20 
AnswerRe: Convert C++/CLI code to Visual Studio 2002 Managed C++ Pin
Dave Doknjas12-Apr-12 12:03
Dave Doknjas12-Apr-12 12:03 
QuestionConvert from C# to VC++2010 dataGridView Enter-Key Movements? Pin
Paramu19738-Apr-12 22:13
Paramu19738-Apr-12 22:13 
AnswerRe: Convert from C# to VC++2010 dataGridView Enter-Key Movements? Pin
Dave Doknjas10-Apr-12 10:45
Dave Doknjas10-Apr-12 10:45 
Questionerror C2061 - Form1 Rename Problem ? Pin
Paramu19737-Apr-12 1:37
Paramu19737-Apr-12 1:37 
AnswerRe: error C2061 - Form1 Rename Problem ? Pin
Paramu19737-Apr-12 2:26
Paramu19737-Apr-12 2:26 
GeneralRe: error C2061 - Form1 Rename Problem ? Pin
Richard MacCutchan7-Apr-12 6:48
mveRichard MacCutchan7-Apr-12 6:48 
QuestionIn Win32 OS, is single-precsion float faster than double? Pin
zipliu6-Apr-12 10:31
zipliu6-Apr-12 10:31 
AnswerRe: In Win32 OS, is single-precsion float faster than double? Pin
Richard Andrew x646-Apr-12 15:49
professionalRichard Andrew x646-Apr-12 15:49 
AnswerRe: In Win32 OS, is single-precsion float faster than double? Pin
Richard MacCutchan6-Apr-12 22:09
mveRichard MacCutchan6-Apr-12 22:09 
GeneralRe: In Win32 OS, is single-precsion float faster than double? Pin
Albert Holguin15-Apr-12 16:05
professionalAlbert Holguin15-Apr-12 16:05 
GeneralRe: In Win32 OS, is single-precsion float faster than double? Pin
Richard MacCutchan15-Apr-12 20:56
mveRichard MacCutchan15-Apr-12 20:56 
GeneralRe: In Win32 OS, is single-precsion float faster than double? Pin
Albert Holguin16-Apr-12 13:12
professionalAlbert Holguin16-Apr-12 13:12 
AnswerRe: In Win32 OS, is single-precsion float faster than double? Pin
Albert Holguin15-Apr-12 16:05
professionalAlbert Holguin15-Apr-12 16:05 
AnswerRe: In Win32 OS, is single-precsion float faster than double? Pin
Sean old school game guy7-May-12 10:55
Sean old school game guy7-May-12 10:55 
QuestionFmod include errors Pin
Member 79972644-Apr-12 13:55
Member 79972644-Apr-12 13:55 
AnswerRe: Fmod include errors Pin
Richard Andrew x644-Apr-12 17:40
professionalRichard Andrew x644-Apr-12 17:40 

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.