Click here to Skip to main content
16,005,281 members
Home / Discussions / C#
   

C#

 
GeneralRe: How To Set Toolbar Button Images [modified] Pin
Kevin Marois22-Aug-08 10:57
professionalKevin Marois22-Aug-08 10:57 
QuestionExcel 2007 Add-in ??? Pin
Member 426807222-Aug-08 8:02
Member 426807222-Aug-08 8:02 
QuestionCustom property with multiple values in property grid Pin
DaveyM6922-Aug-08 8:00
professionalDaveyM6922-Aug-08 8:00 
AnswerRe: Custom property with multiple values in property grid [Solved] Pin
DaveyM6922-Aug-08 10:11
professionalDaveyM6922-Aug-08 10:11 
QuestionCan We Use Windows Presentation Foundation in .Net framework 2.0? Pin
bruze22-Aug-08 6:49
bruze22-Aug-08 6:49 
AnswerRe: Can We Use Windows Presentation Foundation in .Net framework 2.0? Pin
Paul Conrad22-Aug-08 6:52
professionalPaul Conrad22-Aug-08 6:52 
AnswerRe: Can We Use Windows Presentation Foundation in .Net framework 2.0? Pin
DaveyM6922-Aug-08 8:23
professionalDaveyM6922-Aug-08 8:23 
Question.dll issue! VBA to C# Pin
andredani22-Aug-08 6:46
andredani22-Aug-08 6:46 
Hi all im trying to convert a .dll call method from VBA to C#

VBA Code look like this:

Public Sub SnodAnrop()
Dim result As String
host = "***"
port = "***"
user = "****"
pass = "**"
cert = ""
cacert = ""
service = "**"
arg = vTyp & pnr & datumIn & datumUt
extra = ""
result = Space(1024)
buf = 1024

i = Module1.snod25x(host, port, user, pass, cert, cacert, service, arg, extra, result, buf)
SnodError (result)
If sFel = 0 Then
result = GVRSvar(result)
WriteToFile (result)
End If

Declare Function snod25x Lib "sn25.dll" Alias "****" (ByVal host As String, _
ByVal port As String, _
ByVal user As String, _
ByVal passwd As String, _
ByVal cert As String, _
ByVal CAert As String, _
ByVal Nodtjanst As String, _
ByVal arg As String, _
ByVal extra As String, _
ByVal result As String, _
ByVal Resultbuf As Long) As Long


And i have come this far in C#:

private string result;
[DllImport("sn25.dll", EntryPoint = "****")]
static extern int snod(string host, string port, string user, string passwd, string cert, string CAert, string Nodtjänst, string arg, string extra, string result, int buf);
private void button1_Click(object sender, EventArgs e)
{
result = new String(' ', 1024);
string user = "*****";
string pass = "***";
string service = "GVRPOSDIAP2";
int i = snod("*****", "****", user, pass, "", "", service, textBox1.Text ,"", result, 1024);
textBox2.Text = i.ToString();
textBox3.Text = result;
}

This two code strips are the same. In different language.
The Problem is that dont get any result back, its empty, but in the identical code in VBA its returning info at string result. My Question is how can i write the code in C# so a get back info at the string result????
The int i is giving me status back witch is 0 that meens OK but no info in return!!

Please Help Me!!

Thanks
QuestionRead and Write To Excel/Access Pin
BlitzPackage22-Aug-08 6:25
BlitzPackage22-Aug-08 6:25 
QuestionRe: Read and Write To Excel/Access Pin
led mike22-Aug-08 6:30
led mike22-Aug-08 6:30 
AnswerRe: Read and Write To Excel/Access Pin
Paul Conrad22-Aug-08 6:48
professionalPaul Conrad22-Aug-08 6:48 
AnswerRe: Read and Write To Excel/Access Pin
BlitzPackage22-Aug-08 7:26
BlitzPackage22-Aug-08 7:26 
GeneralRe: Read and Write To Excel/Access Pin
led mike22-Aug-08 7:42
led mike22-Aug-08 7:42 
GeneralRe: Read and Write To Excel/Access Pin
BlitzPackage22-Aug-08 7:44
BlitzPackage22-Aug-08 7:44 
GeneralRe: Read and Write To Excel/Access Pin
led mike22-Aug-08 7:50
led mike22-Aug-08 7:50 
Questionusing c# to set display of LCD screen Pin
benjamin yap22-Aug-08 6:14
benjamin yap22-Aug-08 6:14 
AnswerRe: using c# to set display of LCD screen Pin
DaveyM6922-Aug-08 6:21
professionalDaveyM6922-Aug-08 6:21 
GeneralRe: using c# to set display of LCD screen Pin
benjamin yap22-Aug-08 6:26
benjamin yap22-Aug-08 6:26 
GeneralRe: using c# to set display of LCD screen Pin
Paul Conrad22-Aug-08 6:50
professionalPaul Conrad22-Aug-08 6:50 
GeneralRe: using c# to set display of LCD screen Pin
Samer Aburabie24-Aug-08 8:45
Samer Aburabie24-Aug-08 8:45 
GeneralRe: using c# to set display of LCD screen Pin
led mike22-Aug-08 6:26
led mike22-Aug-08 6:26 
GeneralRe: using c# to set display of LCD screen Pin
DaveyM6922-Aug-08 7:48
professionalDaveyM6922-Aug-08 7:48 
AnswerRe: using c# to set display of LCD screen Pin
Paul Conrad22-Aug-08 6:45
professionalPaul Conrad22-Aug-08 6:45 
AnswerRe: using c# to set display of LCD screen Pin
Dan Neely22-Aug-08 7:03
Dan Neely22-Aug-08 7:03 
QuestionRecommend Commercial Libraries for TAPI and Managed Code Pin
Robert M Greene22-Aug-08 6:12
Robert M Greene22-Aug-08 6:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.