TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Donald C
NA
153
3.5k
Passing a string to an unsafe struct.
May 18 2016 3:45 PM
Hi Guys,
I need to interact with some old Delphi DLLs.
Unfortunately they use the Delphi shortstring variable.
Im having trouble accessing the DLL functions, Im trying to pass in a string parameter when the function requires a Delphi shortstring variable.
I found a reply online which suggested using a struct to create the shortstring variable in c#
http://stackoverflow.com/questions/30569111/how-can-i-marshal-a-delphi-short-string-using-p-invoke
I've pasted in the unsafe struct DelphiShortString struct to my code, but Im now having trouble passing the string to the struct.
DelphiShortString variablename;
How to I pass a string to variablename?
Thanks for your help.
Reply
Answers (
2
)
What is abstract and interface with real time example?
How to get the current page number of a pdf loaded in a form