CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Gonyoda

Search: Search took 0.08 seconds.

  1. Replies
    43
    Views
    29,835

    Re: CFileDialog crash in Platform SDK

    Well, to tell the truth, I didn't implement the MSDN "rewrite" either. I also hate to copy & paste MFC code since that is often asking for trouble down the line.

    I just call the raw API function...
  2. Replies
    8
    Views
    2,324

    Re: Splash Screen Problem - its not MFC anyhow

    I enjoy problems like this, so I spent some time tracing throug the MFC code to see if there was anything different from running the code with the splash, or without. And I couldn't find anything.
    ...
  3. Replies
    43
    Views
    29,835

    CFileDialog crash due to _WIN32_WINNT >= 0x0500 - solution enclosed

    I've had this same problem, and found the solution in the MSDN Magazine from August 2000.

    Since I happened upon this thread (with recent posts) and no solution posted, I figured I'd post the link....
  4. Replies
    11
    Views
    1,390

    Re: How do you check for mem leaks in Win32 app?

    good thing I haven't downgraded my machine to XP yet, eh?

    - John
  5. Replies
    11
    Views
    1,390

    Re: How do you check for mem leaks in Win32 app?

    I resort to using BoundsChecker, by NuMega. Does an excellent job of finding many memory errors, including memory over/underrun, dangling memory, etc. It even tells you where the memory was...
  6. Replies
    2
    Views
    586

    Re: why error when static?

    All static variables need to be instantiated in a CPP file [I think that's the right terminology]. So in your CPP file somewhere put:
    CUtil CUtilFactory::m_util;


    This creates the static...
  7. Replies
    2
    Views
    1,425

    Re: How to print a __int64 ?

    I've had to use the _i64toa C function.

    I wrapped this into a function returning a CString:

    CString Int64ToStr(__int64 i)
    {
    CString result;
    _i64toa( i, result.GetBuffer(40), 10 ); //...
  8. Thread: MACRO Question

    by Gonyoda
    Replies
    7
    Views
    750

    Re: MACRO Question

    In a word: no

    In a sentence or two: Compilers really don't work that way... You need the FUNC() macro in the CPP file because that is where the code needs to be for the .OBJ file for the linker. ...
  9. Replies
    2
    Views
    954

    Re: EBCDIC problems

    It depends on which order the 2nd and 3rd bytes are...

    If they are in the same order as PC 16-bit number is, then:

    BYTE Buffer[n];
    // put data to convert into Buffer, then...
    WORD asciisize =...
  10. Thread: question

    by Gonyoda
    Replies
    8
    Views
    1,014

    Re: question

    Ok, I think you are trying to access a SQL Server database using your C/C++ client program? [Your original email sorta implied the other way around].

    If you ARE trying to access the SQL Server...
  11. Replies
    5
    Views
    734

    Re: Dynamic loading

    Like others have said, this isn't easy to do (or possible) directly in C++. However, if you write your code as a COM object, you can create instances using progid's [regular text names like...
  12. Replies
    4
    Views
    1,266

    Re: Sneind/Receiving large UDP message

    Yes, you'll need to disassemble and reassemble the 50k message using a message ordering scheme. Basically create a buffer like:

    const int BLOCKSIZE = 2048; // or something below 32k - the...
  13. Replies
    1
    Views
    4,218

    Re: Reusing socket address

    You can't bind to the same port in different processes. The SO_REUSEADDR only allows re-binding the port within the same process.

    - John
  14. Replies
    2
    Views
    610

    Re: Max size I can write to a file

    The largest filesize you can write is limited only to underlying disk format. FAT, FAT32 are limited to 4 gigabytes. NTFS is limited only to the amount of free disk space.

    If you do write a...
  15. Thread: question

    by Gonyoda
    Replies
    8
    Views
    1,014

    Re: question

    Are you talking about an extended stored procedure? Or reading/writing directly from/to the raw SQL database files?

    ESP are relatively easy, but raw access - you're on your own I think.

    - John
  16. Replies
    9
    Views
    1,355

    Re: Rounding numbers and truncating

    Actually - sprintf() is a C function, but lets not nitpick... ;)

    A big problem I've had with rounding is that there are inaccuracies when rounding and truncating certain floating-point numbers -...
  17. Replies
    2
    Views
    1,736

    Re: Global variables in a multi threaded process

    Unless you are using thread local storage (TLS) your two threads shouldn't have separate copies of the same global variable. All staticly declared variables will have only 1 copy of itself in your...
  18. Replies
    0
    Views
    2,825

    LPR - IP Printing...

    Does anyone have LPR source code for C or C++? I've browsed through GNU/BSD libraries but haven't (yet) found the source for the LPR program. I often spend a lot of time converting the *NIX code...
  19. Thread: BSTR

    by Gonyoda
    Replies
    3
    Views
    937

    Re: BSTR

    I think more importantly you're looking for BSTR manipulation methods, right? Since a BSTR is a system allocated object (using SysAllocString, for example) you can't really futz with the contents of...
  20. Replies
    3
    Views
    812

    Re: Ado connect to SQL Server

    Easiest thing to do is to start by making a UDL file. Do this by right-clicking in explorer and choosing New, then Microsoft Data Link. If MDL isn't in your New list, you'll need to do it manually....
Results 1 to 20 of 20





Click Here to Expand Forum to Full Width

Featured