View Single Post
 
Old 03-31-2015, 01:19 PM
jill_kitten's Avatar
jill_kitten jill_kitten is offline
Regular
 
Join Date: Apr 2006
Location: USA, WA
Posts: 77
Thumbs up Why and How.. Private classes cannot be passed to outside components.

To whom it may concern, in case you have this issue, note that: [sorry for the bump but I thought this may be useful].

A Standard Exe does not directly support automation and can only have Private classes which cannot be passed to components outside the immediate project [like Dx8], in which case only a form can be used as it acts like a code module and like a public class. This is why the documentation states it must be a form because they have made the assumption [in the docs] that it is within a standard exe.
However an ActiveX Exe or ActiveX Dll can have public classes [the default is 'Multiuse' which is public but not suggested for this use] which can be passed to components outside the immediate project and will work as an implementation for DirectXEvent8 that can be passed to Dx8 [I always do this in a Dll for fast calls], but I would suggest setting the instancing of the class to 'PublicNotCreatable' so that outside clients cannot arbitrarily create the class whenever they want.

By the way, if you take the error number you received and call DxVBLibA.D3DX8.GetErrorString(Err.Number) it should give the name of the error constant which you can then look up and have a better idea of what is wrong. If it returns "Unknown" or an empty string then you can try the Error$(Err.Number) as it may be a Vb error, but if that gives '*-defined error' then mask it with the value 'Err.Number And &HFFFF&', then take that number and look it up in the MSDN under 'Trappable errors'.

I hope someone finds this useful.

-Jill-
__________________
Smeg!
"Oh Listy"..."Rimsy",.. ..."Ahghghaa!"

Linux Mint is way cool! [and super easy to install as a dual boot]
Reply With Quote