I have created my own ActiveX EXE now...I have subclassed a form in this...
And I have the following in a standard EXE:
VB Code:
  1. Public Function SendByteArray(ByVal hWnd As Long, ByVal ByteArray As String) As Long
  2. Dim lngRet      As Long
  3.     marBuffer = ByteArray
  4.     With mudtStruct
  5.         .Length = UBound(marBuffer) + 1
  6.         .Pointer = VarPtr(marBuffer(0))
  7.     End With
  8.     SendByteArray = SendMessage(hWnd, CUSTOM_MESSAGE, GetCurrentProcessId, mudtStruct)
  9.     Erase marBuffer
  10. End Function
  11.  
  12. Public Sub PostByteArray(ByVal hWnd As Long, ByVal ByteArray As String)
  13.     marBuffer = ByteArray
  14.     With mudtStruct
  15.         .Length = UBound(marBuffer) + 1
  16.         .Pointer = VarPtr(marBuffer(0))
  17.     End With
  18.     Call PostMessage(hWnd, CUSTOM_MESSAGE, GetCurrentProcessId, VarPtr(mudtStruct))
  19. End Sub
Now...while in design mode and running the active x exe app from the IDE I can SendByte Array to the activeX...this isn't a problem...however...if I compile the ActiveX EXE then run the above code the SendByte array function fails...the ActiveX doesn't even pick up the custom message, and so ALWAYS returns a 0 for the pointer value, however, the POSTMessage does work...but I need SendMessage...
Why is this?

Woka