473,396 Members | 1,804 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,396 software developers and data experts.

How to pass string to atl com dll from visual c#

Hi,

What data type(wchar or bstr or variant) I have to give for string in
atl com dll which will use in asp.net aplication and code-behind is visual c#?

code snippet:
STDMETHODIMP CMyTest::TestStringFunc(BSTR bstrFilesInfo)
{
// TODO: Add your implementation code here
return S_OK;
}
In Visual C#, what data type I have to take to send the string data to
atl com dll?

protected void Button1_Click(object sender, EventArgs e)
{
MyTestClass obj = new MyTestClass();
obj.TestStringFunc("hi welcome to visual c#"); //application getting
crash here.
Response.Write("Durga...4");
}
//error info:Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.

Thanks in advance.

--
Thanks & Regards,
John.
Apr 8 '07 #1
1 1593
Answered elsewhere. So far I've counted 3 multiposts.

Brian

Apr 8 '07 #2

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

Similar topics

3
by: Bart Nessux | last post by:
I'm writing a script that does some basic pre-configuration for our new Macs (OSX 10.3.2). I'm trying to enable the root account automatically with the script, but I don't know how to pass stings...
4
by: mrgr8avill | last post by:
Hello, all. First off, I apologize for my ignorance. I am not used to working with non-variants, and it has been a LONG time since I dealt with OOP. I need to pass a string to a compiled...
0
by: Pete Kane | last post by:
Hello All, I'm a seasoned Foxpro programmer who is just feeling the waters of C# using InterOp. Is it possible to pass a Visual Foxpro form object to a ..NET dll method and have the method set some...
6
by: NewToCode | last post by:
I built an application aroung the FileSystemWatcher and i am having trouble passing a string from my mainForm to a second form toastForm. Can someone please give me some insight on how to do this....
3
by: Athono | last post by:
How do I declare a string and pass it from a Visual Basic GUI to a C++ DLL? Now I am debugging successfully. I can debug either on the Visual Basic end or I can debug on the C++ side by using the...
3
by: Bob Simoneau | last post by:
I have a function call to a C DLL which takes a string as a parameter, and modified the string. I keep getting the following error. I beleive I have to marshal the string, but I am unsure how to...
1
by: askcq | last post by:
Can anyone help on this ?? how to pass String as Argument while creating TASK in VXWORKS
4
by: bmerlover | last post by:
Hi, I need to read a script file and change the text on the buttons I set. I have the psuedocode in my head, but I'm having trouble putting that into code. I figured out how to seperate B1 from T1...
5
by: Pawel_Iks | last post by:
Hello! I want to use following statement to pass command-line arguments into main function: int main(int argc, string argv) { if (argc>0) { //do something
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.