Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21197

UDTs and the API

$
0
0
Hi All, I am new to this forum so please bear with me. I have been encountering problems passing UDTs to API functions. I have experienced this UDT issue with passes to class modules as well. Currently, I have been unable to use MoveToEx at all.

Public Declare Function MoveToEx Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal lpPoint As POINTAPI) As Long

I am wishing to draw on a form. The API declares are in a code module as well as the Type declarations. I Dim a POINTAPI in my form code and I get

User-defined type can't be passed ByVal

I have searched the web and all the back-dated forums on this issues and I have seen references to this problem, but the solutions offered never worked. I am missing something obvious I think, but I am frustrated enough to ask. I appreciate any insight.

Thanks, Rob

Viewing all articles
Browse latest Browse all 21197

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>