473,398 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Casting void far pointer to System::Text::StringBuilder

Bob
I am using an API that needs a function pointer with the following
prototype:

void CALLBACK DXLExportStreamFunc ( const BYTE *bytes, DWORD length,
void far *Context )

I get to pass it the Context and want to pass it a StringBuilder to
catch the "bytes" in. I tried:

System::Text::StringBuilder *sb = new System::Text::StringBuilder;
APIFunction ( DXLExportStreamFunc, &sb)

Then in the DXLExportStreamFunc, I tried among other things:
System::Text::StringBuilder *localBuilder =
(System::Text::StringBuilder *)Context;

but it does not work.
I need the solution to leave the memory in place as this function gets
called many times and the StringBuilder will become VERY large.
Thoughts?
Thank You,
Bob K.
Nov 17 '05 #1
0 1948

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: hplloyd | last post by:
I am using some code off the web that requires a string builder in a script within a web page. In order to get the script to work I need to include the relevant library in the references section...
0
by: Arne Adams | last post by:
Hi changing a StringBuilder through a deduced type throws an exception - Sample Code void editBuilder(System::Text::StringBuilder* t System::String* insertThis = S"inserted"...
0
by: I am Sam | last post by:
Ok I don't know what is the problem with my code But I am trying to build a newsletter that gathers parameters from 3 textbox controls and a Listbox control. The form then queries the event table...
0
by: Greg | last post by:
Not sure if this is best place for this problem, but here it is. I have a project that is simply a C# class that interfaces with an IFilter. This is so I can retreive the text from Word docs. ...
4
by: Cor | last post by:
Hi Newsgroup, I have given an answer in this newsgroup about a "Replace". There came an answer on that I did not understand, so I have done some tests. I got the idea that someone said,...
4
by: Henning M | last post by:
Hej All Im relativ new to VB.net and im trying to collect som device information using cfgmgr32.dll I use - Declare Function GetListLength Lib "cfgmgr32.dll" Alias...
8
by: Henning M | last post by:
Hi, I'm trying to use stringbuilder to collect a list of strings. (as suggested by Claes Bergefall) Declare Auto Function CM_Get_Device_ID_List Lib "cfgmgr32.dll" (ByVal pszFilter As String,...
0
gchq
by: gchq | last post by:
Hi there I'm attempting to put together a string that will line up in columns and then insert this into a pdf form! I've managed this before, but for some reason the columns do not line up this...
2
by: RP | last post by:
I want to use: System.String, and System.Text.StringBuilder But both are not visible when I press System. I even checked the references, but the names are not visible there also. How to use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.