p is a structure of type PKBDLLHOOKSTRUCT already. From what I understand it is typecasting lParam to type PKBDLLHOOKSTRUCT and assigning the values to p. How would this be done in PB?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
*p.PKBDLLHOOKSTRUCT = lParam
*p\member1 = 100
a = *p\member2
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
If p is really a structure (and not a pointer to a structure), then you can't do it like that in PB. You have to assign the individual structure members.
If p is a pointer to a structure, you just use declare *p.PKBDLLHOOKSTRUCT and then use *p = lParam.