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

Search:

Type: Posts; User: quandary

Page 1 of 3 1 2 3

Search: Search took 0.06 seconds.

  1. Replies
    7
    Views
    1,098

    Re: How to store text in a executable?

    Haha, very funny.
    I was using Linux that year...
    I just hadn't had a problem in that year, so I didn't have to come back here to write that.

    But comes time, comes a new (better-paying) employer,...
  2. Replies
    8
    Views
    10,973

    Re: CString to unsigned long long

    #include <string>
    #include <sstream>
    #include <fstream>

    e.g.


    #include <iostream>
    #include <fstream>
    #include <exception>
  3. Replies
    20
    Views
    11,135

    Re: CString to const char*

    Let me guess: colon ?
  4. Re: Best way to call functions exported by a dll?

    Typical Microsoft documentation.
    Long, imprecise and useless.



    Create .lib file from .dll

    search c:\program files\Microsoft Visual Studio for dumpbin.exe

    Copy it to your project path
  5. Replies
    8
    Views
    10,973

    Re: CString to unsigned long long

    The below code converts an int (baseX) to a C-String

    Substitute int with long long, and reverse the direction of the program flow.



    inline LPTSTR RADIX_itoa(int iNumber, LPTSTR lpNumber, int...
  6. Re: Best way to call functions exported by a dll?

    The provider company has filed bankruptcy already some time ago...
  7. Replies
    20
    Views
    11,135

    Re: CString to const char*

    No, I'm not, since I cannot get CString to work with my compiler...

    Why use CString anyway?
    Use the normal std::string filename, then you can do filename.c_str().
    Then, your application is...
  8. Re: Best way to call functions exported by a dll?

    Good idea, just at the moment, I'm playing with the Microsoft Interface Definition Language Compiler.
  9. Re: Best way to call functions exported by a dll?

    Can I generate a LIB file somehow, if I only have the dll?
  10. Re: Best way to call functions exported by a dll?

    Unfortunately, I need most of them!
  11. Replies
    7
    Views
    1,098

    Re: How to store text in a executable?

    There's an example of how to do it in Delphi on CodeGear.
    I've been able to port it to C++. Problem solved.
  12. Replies
    20
    Views
    11,135

    Re: CString to const char*

    #include <tchar.h>

    CString filename(_T("Hello_World.txt"));

    LPTSTR lpFileName = (LPTSTR ) malloc( (_tcslen(filename)+1)*sizeof(TCHAR) + sizeof(TCHAR));
    _tcscpy(lpFileName, filename) ;...
  13. Replies
    3
    Views
    902

    Re: Memory access

    Avoiding checksum tests on filez and dll injection detection.
    But I guess you would call that illegitimate.

    But it works with read/write process memory (if you do a GetDebugPermission), even on a...
  14. Best way to call functions exported by a dll?

    Question:

    I have a dll that exports some functions.

    Like:
    EXPORT char* WINAPI WebServicesGetPluginName()
    EXPORT bool WINAPI WebServicesInit(char *szAppTitle, char* szPath, IDispatch*...
  15. Replies
    2
    Views
    3,594

    Re: DLL loading error?

    Thanks for the tipp ! ! !
    That has helped somewhat.
    That was just another reason why it did crash.
    Now that I have found out all the reasons, I'll share it:

    1. If I load the C++ dll from an...
  16. Replies
    2
    Views
    3,594

    [RESOLVED] DLL loading error?

    I have a question:

    My application calls a C++ dll.
    The C++ dll in turn has to call a VB dll (device driver).


    Now, I can call the VB ActiveXdll from my application without problem, but if I...
  17. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    Here's my version:

    Note that for unknown reason the memset '\0' at the end of chrarry_VersionNumber would not be necessary.

    This way it's much more clear what the last few statements do.
  18. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    yes, that's why the original version was:
    sscanf (charry_PRGresponse,"%*s [Version %s]", chrarry_VersionNumber);

    Now notice the %*s:

    This is a wildcard for several characters, which sscanf...
  19. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    Yes, that's exactly what I meant with one of my previous posts, except that you just copying the char instead of using strcat, but that's more efficient.

    In the meantime I intended to strstr ] and...
  20. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    This outputs:
    v: Microsoft Windows XP [Version 5.1.2600]



    There's no point in sscanf'ing a string I already have...
    The output is expected to be:

    v: 5.1.2600
  21. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    I got it, the MSDN sample now works:



    #include <windows.h>
    #include <tchar.h>

    #include <stdio.h>
    #include <stdarg.h>
  22. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    Yes, I am.

    I still need to lookup va_arg for StringCchPrintf


    HRESULT StringCchCopy( LPTSTR pszDest, size_t cchDest, LPCTSTR pszSrc)
    {
    // char* strncpy(char* dest, const char* src, size_t...
  23. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    chrarry_VersionNumber[strlen(chrarry_VersionNumber) -1] = '\0' ;

    is not the bug. It is an allowed expression.

    I think I'm getting the MSDN example to work.
    I found the missing defines on the...
  24. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    I wanted to retrieve the version number without using the Windows API.

    Well, I can use GetOSDisplayString from the Windows API
    http://msdn.microsoft.com/en-us/library/ms724429(VS.85).aspx

    But...
  25. Replies
    26
    Views
    4,435

    Re: little sscanf problem

    You mean strstr search for "Version "
    and then strcat all strcpy strstr + strlen("Version ") until ']' is reached?
    Or did I missunderstand your suggestion ?



    Well... that's what I fear, too....
Results 1 to 25 of 73
Page 1 of 3 1 2 3





Click Here to Expand Forum to Full Width

Featured