Summary
This article provide details on Problem building FNP 11.6.1 csharp sample application 'out of the box'Symptoms
The csharp sample supplied with FlexNet Publisher 11.6.1 will not build 'out of the box'. It generates the following error:"Pointers and fixed size buffers may only be used in an unsafe context"
for both the declaration ot lt_errstring and lt_warning.
public static extern char* lt_errstring();
public static extern char* lt_warning();
Cause
The error can be resolved by charging the declaration from char* to char or by changing the declaration tounsafe public static extern Byte* lt_errstring();
unsafe public static extern Byte* lt_warning();
Resolution
Statement from engineering -
In C# is required to handle conversion of parameters when it calls across to a native API. Certain basic parameters need no special handling, but more complicated data, such as structures and arrays require further work. If you *cannot* change the interface to a native function and are stuck with certain data types which cannot be safely marshalled - the "unsafe" keyword comes in. It enables you, as a developer, to accept the "unsafe" data interface - but note that in turn this marks your whole application as "unsafe" too. This is generally not what a publisher wants.
Typically, when you *can* change that interface, it is advisable to modify it such that it becomes safe in the eyes of C#.
See this for more information:
http://blog.rednael.com/2008/08/29/MarshallingUsingNativeDLLsInNET.aspx
Workaround
See aboveWas this helpful?
Related Articles
Manual Heartbeat Example Using FlexNet Publisher 11.6.1 29Number of Views How do You Setup a FlexNet Publisher License Server to Output a Report Log For FlexNet Manager for Engineering Applications? 14Number of Views Building of the Production FNP Licensing Toolkit for Trusted Storage may result in the error: Trusted config processing fa… 10Number of Views Elevated Privilege Issue with FlexNet Publisher Licensing Service on Windows 9Number of Views Can The FlexNet Publisher License Server Serve A Flex Enabled Client Application Over DirectAccess? 8Number of Views
Revenera Assistant
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Revenera Assistant
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago