473,787 Members | 2,938 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calling a DLL from VB.net, with a pointer to a string.

1 New Member
Hi,

I need to call a DLL function, from vb.net. The c++ header for the DLL looks like this

Expand|Select|Wrap|Line Numbers
  1. GRIDHANDLE tek_CreateGrid (const char* const kszMapName, DEVICEINDEX devIndex )

GRIDHANDLE and DEVICEINDEX are both integer types.

In vb.net I need to pass a null terminated string, with a value in it, to kszMapName. If the DLL was just expecting a cString, passed in as a parameter, I'd be golden. But it needs a pointer....
Sep 12 '11 #1
0 1096

Sign in to post your reply or Sign up for a free account.

Similar topics

13
6752
by: Matthew Jakeman | last post by:
If i have a pointer, char *. That i have checked is only 1 character long, is just casting it to a char using (char) the best way or is there another way ?
16
382
by: zohaibbaloch | last post by:
how to manipulate string without using arrays.manipulation example i have to print dog or any string i want to cut d from dog and paste it a end and add a at the last dog becoms ogda. please help
26
563
by: junky_fellow | last post by:
Consider the following piece of code: char *str = "Hello"; if (str = "Hello") printf("\nstring matches\n"); str is pointer to char and "Hello" is a string literal whose type is "array of char". How can we compare two different objects for equality ? Is some conversion is being done before that comparison ?
5
6243
by: shan_rish | last post by:
Hi Group, When i compile the following program it compiles successfully, but crashes while executing. I am trying to assign a NULL char pointer to a string. The error message is /home1/murugan/prog/ccprog >./a.out Abort(coredump) /home1/murugan/prog/ccprog >
2
1227
by: | last post by:
I'm completely new to python, so sorry for my ignorence. How does one go about converting a string, for instants one received through tcp, into something that can be called as a function? I'm trying to have what the user sends to the computer through the network, run as a function. If the user sends "motd", the function motd will be run inside the script. Thanks Much, Brandon McGinty Brandon.mcginty@gmail.com
14
2417
by: key9 | last post by:
Hi All On coding , I think I need some basic help about how to write member function . I've readed the FAQ, but I am still confuse about it when coding(reference / pointer /instance) , so I think I need some "template". Sorry for my coding experience in c++
8
1751
by: merrittr | last post by:
I have been having troubles getting "string" input pushed on to the stack in the assn1. The funny thing is I can push a literal on no problem so push("push i 0"); push("push i 1"); push("add"); works fine however
4
3747
by: thyagi | last post by:
a function which takes a string (pointer to char) as a parameter and returns the integer equivalent.str2int("1658") would return the value 1658 To improve your program change the function to accept strings with a leading minus sign toi ndicate a negative number. One last improvement might be to print a warning if the string represents a numberthat is outside the range of an int.
4
2389
by: prasad8619 | last post by:
please help me out in this regard as this is urgent to me because i stuck in the middle of a program....... here I have a program like this...... char name="rajesh"; char *x=strchr(name,"j"); int k =strlen(name); int i=x-name; int p=k-i;
6
1895
by: abhinuke | last post by:
I am trying to print prime numbers from 1 to 100. I am passing an array to a function and then zeroing all the elements which are multiples of 2,3,5. When I compile the code,I am getting all the memory addresses as an output. Here is the code that I have written. #include <stdio.h> #include <stdlib.h> #define size 100 int main() { int i,a; int prime(int *,int);
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8993
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5535
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.