Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
J

jeff6

@jeff6
About
Posts
14
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • error C2059: syntax error: '<tag>::*'
    J jeff6

    But QString::fromAscii is a Static Public Members from Qt : QString Class Reference I thought I just had to replace CMember by QString and Target by fromAscii from the MS sample...

    C / C++ / MFC c++ help question

  • error C2059: syntax error: '<tag>::*'
    J jeff6

    Hello, I'm trying to adapt some Microsoft code (member.cpp in Detours) for my case ( I just want to replace void CMember::Target(void) by QString QString::fromAscii(const char *str, int size): MS Code :

    class CMember
    {
    public:
    void Target(void);
    };

    void CMember::Target(void)
    {
    printf(" CMember::Target! (this:%p)\n", this);
    }

    //////////////////////////////////////////////////////////////// Detour Class.
    //
    class CDetour /* add ": public CMember" to enable access to member variables... */
    {
    public:
    void Mine_Target(void);
    static void (CDetour::* Real_Target)(void);

    // Class shouldn't have any member variables or virtual functions.
    

    };

    void CDetour::Mine_Target(void)
    {
    printf(" CDetour::Mine_Target! (this:%p)\n", this);
    (this->*Real_Target)();
    }

    void (CDetour::* CDetour::Real_Target)(void) = (void (CDetour::*)(void))&CMember::Target;

    My code :

    class CDetour /* add ": public CMember" to enable access to member variables... */
    {
    public:
    QString Mine_Target(const char *str, int size);
    static QString (CDetour::* Real_Target)(const char *str, int size);

    // Class shouldn't have any member variables or virtual functions.
    

    };

    QString CDetour::Mine_Target(const char *str, int size)
    {
    printf(" CDetour::Mine_Target! (this:%p)\n", this);
    (this->*Real_Target)(str, size);
    }

    QString (CDetour::* CDetour::Real_Target)(const char *str, int size) = (CDetour::*)(const char *str, int size)&QString::fromAscii;

    But I get : error C2059: syntax error: '< tag >::*' for the last line Why ?! Thanks. Edit : If I do :

    QString (CDetour::* CDetour::Real_Target)(const char *str, int size) = (QString(CDetour::*)(const char *str, int size))&QString::fromAscii;

    I get : error C2440: 'type cast' : impossible to convert from 'QString (__cdecl *)(const char *,int)' into 'QString (__thiscall CDetour::* )(const char *,int)'

    C / C++ / MFC c++ help question

  • ""Object reference not set to an instance of an object" when creating new project with VS
    J jeff6

    But it appeared just recently, it had worked for years before

    C / C++ / MFC visual-studio help csharp c++

  • ""Object reference not set to an instance of an object" when creating new project with VS
    J jeff6

    Hello, I get this error when I try to create a new project wi h Visual Studio 2010 (XP), Win32, MFC or Forms (only VB works) "Object reference not set to an instance of an object" I found nothing with Google for this case (just creating a new project) and tried to uninstall/install, repair, n times, impossible to fix :-( Thanks in advance for any idea, I'm desperate, unable to create even an empty Win32 project !

    C / C++ / MFC visual-studio help csharp c++

  • Detours : how to hook QT applications ?
    J jeff6

    Finally, I was wrong : I found an easier way. I just create a Qt DLL that I inject in the destination process, then I get the QWidget* from the main hWnd and I can enumerate all children from there and do what I want on any Qt pseudo-control Thanks for answers.

    C / C++ / MFC tutorial c++ com json question

  • Detours : how to hook QT applications ?
    J jeff6

    The functions are correctly exported from QtGui4.dll : bool QPushButton::event(class QEvent *) Tools like "Auto Debug Pro" can hook them. So it is certainly possible to hook them with Detours. (there is no other way to do what I'm trying to do (interact with Qt pseudo-buttons, drawn by Qt with memory instructions, from its source code))

    C / C++ / MFC tutorial c++ com json question

  • Detours : how to hook QT applications ?
    J jeff6

    Hello, with Detours, one can hook any api call. In the sample "wrotei.cpp", COM interfaces can be hooked : " CreateStreamOnHGlobal(NULL, TRUE, &pStream); //... RealIStreamWrite = pStream->lpVtbl->Write; //... " But is it possible to hook QT ? Because in QT source code, there is no interfaces, just classes for example, could it be possible to hook QPushButton::event() ? : bool QPushButton::event(QEvent *e) { // code return QAbstractButton::event(e); } Thanks.

    C / C++ / MFC tutorial c++ com json question

  • Where is IACLCustomMRU declared ?
    J jeff6

    Find what ?! There is nothing in MSDN doc about declarations, include files, IID_IACLCustomMRU constant, etc ...

    C / C++ / MFC question

  • Where is IACLCustomMRU declared ?
    J jeff6

    Hello, I cannot find IACLCustomMRU in any header. Same thing for associated constant : IID_IACLCustomMRU Thanks in advance.

    C / C++ / MFC question

  • Simple chat across internet without server
    J jeff6

    Hello, I would want to write a small chat program allowing to communicate across the Net. But I only found classic Winsock samples with 1 server/clients, where clients need an ip address to connect with the server. Isn't it possible to have only clients (which would probably be also servers for others clients) ? (if I just have 2 executables on 2 different PCs, I cannot know the ip of the other client exe) Thanks.

    C / C++ / MFC sysadmin question lounge

  • Find sub-url
    J jeff6

    Hi, I have an URL like http://my.lotro.com/home[^] Is it possible to find sub-urls like http://my.lotro.com/home/character/4368675/150026162587528896[^] ? (similar to FindFirstFile(), ...) (web spiders find them for example) Thanks.

    C / C++ / MFC com tutorial question

  • Prevent Windows From Entering Hibernate Mode
    J jeff6

    Juts disable it by schemes code had been posted many times on pro win32 group

    news://nntp.aioe.org/comp.os.ms-windows.programmer.win32
    or http://tinyurl.com/cmhb5g by Google

    C / C++ / MFC java question

  • Is there any way to SendMessage to a Button control
    J jeff6

    NO. Just send BM_CLICK (!)

    C / C++ / MFC help question

  • how to convert images through C++
    J jeff6

    You don't need any library Just use Shell apis (1 line of code to convert any format into any other format)

    C / C++ / MFC c++ tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups