Hi
I am trying to convert the C# code included in this post
http://forums.autodesk.com/t5/NET/Dynamic-Input/td-p/1339772144
for an undocumented method acedSetDynInputDisplayMessage to vb.net
i am having trouble converting these lines of code C# code to vb.net
[DllImport("acad.exe",EntryPoint="?acedSetDynInputDisplayMessage@@YA_N_N@Z")]
private static extern bool acedSetDynInputDisplayMessage(bool displayMessageOnce);
'Using VB.net example syntax From this website post
'http://through-the-interface.typepad.com/through_the_interface/2006/07/calling_objecta.html
Private Declare Auto Function acedSetDynInputDisplayMessage Lib "acad.exe" Alias "?acedSetDynInputDisplayMessage@@YA_N_N@Z" _
(<MarshalAs(UnmanagedType.LPWStr)> ByVal acedSetDynInputDisplayMessage As Boolean) As Boolean
However it only works in part due to the second (bool displayMessageOnce) missing not sure how to include this in the vb.net code
any recommendations on how I do this in vb.net would be apprieciated.
Regards
Justin Ralston
Regards
Justin Ralston
I think this should work, but I don't use VB so it's just a best guess based on other similar posts:
Private Declare Auto Function acedSetDynInputDisplayMessage Lib "acad.exe" Alias "?acedSetDynInputDisplayMessage@@YA_N_N@Z" _
(displayMessageOnce As Boolean) As Boolean
This is how I have done it for other things. (This is what the converter at CodeFusion spits out, as well)
<Runtime.InteropServices.DllImport("acad.exe", EntryPoint:="?acedSetDynInputDisplayMessage@@YA_N_N@Z")> _
Private Shared Function acedSetDynInputDisplayMessage(ByVal displayMessageOnce As Boolean) As Boolean
End Function
Can't find what you're looking for? Ask the community or share your knowledge.