I wonder if anyone could help please? I've got various unmanaged MDL functions in a C# addin for microstation v8i. The implementation of these is fine and when they work it's great.
Here's some code for background:
[DllImport("stdmdlbltin.dll", CallingConvention = CallingConvention.Cdecl)] internal static extern long mdlView_saveNamed(IntPtr viewNameP, IntPtr descriptionP, IntPtr viewNameSpace, long view);
See the page from MDL Function guide below for the above function. The function returns a 'StatusInt' which indeed does return an integer/long value. But I don't understand what this is or means.
Could someone either point me to a reference that I can look up these codes or give me a clue as to how I can translate them to something string-like.
I've tried assuming they're pointers and tried these:
Marshal.PtrToStringAnsi(pointer) Marshal.PtrToStringAuto(pointer)
Any ideas?
mdlView_saveNamed
Function
StatusInt | mdlView_saveNamed |
( | |
MSWChar const* | viewNameP , |
MSWChar const* | descriptionP , |
MSWChar const* | viewNameSpace , |
int | view |
); |
Description
- Save the current settings for one of the view windows to a named view element using the given name and description.
Required Header
- <msview.fdf>
Required Library
- mdlbltin.lib (MicroStation Built-in)
Return Value
Type | Description |
---|---|
StatusInt | SUCCESS if the view element is saved successfully, otherwise MDLERR_BADARG if the view argument is not a valid view number. |
Parameters
Type | Name | Mode | Description |
---|---|---|---|
MSWChar const* | viewNameP | IN | the name to be given to the named view element when it is saved. |
MSWChar const* | descriptionP | IN | the description to be given to the named view element when it is saved. |
MSWChar const* | viewNameSpace | IN | the name space of the named view element. Using NULL will make this named view available to management by the end user via the save views application. Using a non-null value has the effect of making it a protected named view, which is only accessed by the API. |
int | view | IN | the view number to be saved as a named view element. |
Version
- 8.0.0
VBA Wrapper Declaration
- Declare Function mdlView_saveNamed Lib "stdmdlbltin.dll" ( ByVal viewNameP As Long , ByVal descriptionP As Long , ByVal viewNameSpace As Long , ByVal view As Long ) As Long