Jump to content
Sign in to follow this  

DllStruct functions equivalent c++

Recommended Posts


I need this function in C + + code:

Func RichEditGetSelect($hWnd)
    Local $tCharRange = DllStructCreate("long cpMin;long cpMax")
    _SendMessage($hWnd, 1076, 0, DllStructGetPtr($tCharRange))
    Local $aRet[2]
    $aRet[0] = DllStructGetData($tCharRange, 1)
    $aRet[1] = DllStructGetData($tCharRange, 2)
    Return $aRet

SendMessage is not a problem ...

but functions DllStructCreate, DllStructGetPtr and DllStructGetData are a huge problem.

so I created the C + + code trying to use a structure:

long* DLL_EXPORT RichEditGetSelect(HWND a)

long Ret[2];

    typedef struct Done
        long cpMin;
        long cpMax;

    Done ptr;

      Ret[0] = ptr.cpMin;
      Ret[1] = ptr.cpMax;
    return Ret;

But you need a LPARAM and then returns error:

Posted Image

can anyone help me?

Share this post

Link to post
Share on other sites




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this