By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,032 Members | 1,161 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,032 IT Pros & Developers. It's quick & easy.

How to obtain a pointer of string variable

P: n/a
Dear Sir,

I used a API call EbExecuteLine of VBA6.dll. It have a
parameter pStringCode (Pointer of a String). For this i
used StrPtr() function. It is working in my project. But
when i make setup program of this project and install it
to another system it gives an error "This Program Perform
An illigale operation".
Please help me how can I eleminate it.

Thanks

Ashok Maheshwari
Nov 20 '05 #1
Share this Question
Share on Google+
30 Replies


P: n/a
Armin,

If he was using an older VB why would he complain that StrPtr is missing?

Please mark these irrelevancies as OT? ;-)

Regards,
Fergus
Nov 20 '05 #2

P: n/a
Hello,

"Ashok" <as**********@yahoo.com> schrieb:
I used a API call EbExecuteLine of VBA6.dll. It have a
parameter pStringCode (Pointer of a String). For this i
used StrPtr() function. It is working in my project. But
when i make setup program of this project and install it
to another system it gives an error "This Program Perform
An illigale operation".


Please post the complete VB6 declaration of 'EbExecuteLine'. Why do you use
this function?!

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #3

P: n/a
Cor
Hi Fergus,
Up again, was not so late last night I saw as usual (In this newsgroup)..
Oeps I almost forgot OT
Cor
Nov 20 '05 #4

P: n/a
"Ashok" <as**********@yahoo.com> schrieb
I used a API call EbExecuteLine of VBA6.dll. It have a
parameter pStringCode (Pointer of a String). For this i
used StrPtr() function. It is working in my project. But
when i make setup program of this project and install it
to another system it gives an error "This Program Perform
An illigale operation".
Please help me how can I eleminate it.


The StrPtr function does not exist anymore in VB.NET. This is a VB.NET
group. For older versions please turn to one of the microsoft.public.vb.*
groups.
--
Armin

Nov 20 '05 #5

P: n/a
Armin,

If he was using an older VB why would he complain that StrPtr is missing?

Please mark these irrelevancies as OT? ;-)

Regards,
Fergus
Nov 20 '05 #6

P: n/a
"Fergus Cooney" <fi******@tesco.net> schrieb
Armin,

If he was using an older VB why would he complain that StrPtr is
missing?
If he was using VB.NET, he wouldn't write "It is working in my project".
But you are right, I ignored "VBA6.dll" - probably because I couldn't image
that anybody would ever do this to a VB.NET application. :)
Please mark these irrelevancies as OT? ;-)


If you would mark yours with OT, I could add a filter saving 66.6% of my
download time. ;-)
--
Armin

Nov 20 '05 #7

P: n/a
Cor
Hi Fergus,
Up again, was not so late last night I saw as usual (In this newsgroup)..
Oeps I almost forgot OT
Cor
Nov 20 '05 #8

P: n/a
Hello,

"Cor" <no*@non.com> schrieb:
Up again, was not so late last night I saw as usual
(In this newsgroup).. Oeps I almost forgot OT


Do you always add "OT" to off topic posts now?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #9

P: n/a
Hello,

"Armin Zingler" <az*******@freenet.de> schrieb:
If he was using VB.NET, he wouldn't write "It is working in my project".
But you are right, I ignored "VBA6.dll" - probably because I couldn't image that anybody would ever do this to a VB.NET application. :)


I could not even get this function work correctly with VB6.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #10

P: n/a
Cor
Hi Herfried,
I try and the OT you asked, if it was EOT was OT, I had done an OT message
to you.
Cor
Nov 20 '05 #11

P: n/a
"Fergus Cooney" <fi******@tesco.net> schrieb
Armin,

If he was using an older VB why would he complain that StrPtr is
missing?
If he was using VB.NET, he wouldn't write "It is working in my project".
But you are right, I ignored "VBA6.dll" - probably because I couldn't image
that anybody would ever do this to a VB.NET application. :)
Please mark these irrelevancies as OT? ;-)


If you would mark yours with OT, I could add a filter saving 66.6% of my
download time. ;-)
--
Armin

Nov 20 '05 #12

P: n/a
Hi Armin,

At least in the chat there's the possibility of a laugh and some fun.
These redirections, though, ... :-(

Actually, I think you should use TC for Traffic Control, or PD for Police
Duties, GL for Get Lost, or something. ;-)

Regards,
Fergus


Nov 20 '05 #13

P: n/a
Hello,

"Cor" <no*@non.com> schrieb:
I try and the OT you asked, if it was EOT was OT, I had done
an OT message to you.


I don't really understand you.

EOT = End Of Thread
OT = Off Topic

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #14

P: n/a
Hello,

"Cor" <no*@non.com> schrieb:
Up again, was not so late last night I saw as usual
(In this newsgroup).. Oeps I almost forgot OT


Do you always add "OT" to off topic posts now?

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #15

P: n/a
Hello,

"Armin Zingler" <az*******@freenet.de> schrieb:
If he was using VB.NET, he wouldn't write "It is working in my project".
But you are right, I ignored "VBA6.dll" - probably because I couldn't image that anybody would ever do this to a VB.NET application. :)


I could not even get this function work correctly with VB6.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #16

P: n/a
Cor
Hi Herfried,
I try and the OT you asked, if it was EOT was OT, I had done an OT message
to you.
Cor
Nov 20 '05 #17

P: n/a
Cor
Herfried,
EOT = End Of Thread
OT = Off Topic


Yes I know, but you had asked me last night if I did mean EOT when I had
written OT, and it was not.
I had special used OT. And because I did want to have the thread an EOT, I
did not answer you.
:-)) little things are the most difficult to explain.
Cor
Nov 20 '05 #18

P: n/a
Hi Armin,

At least in the chat there's the possibility of a laugh and some fun.
These redirections, though, ... :-(

Actually, I think you should use TC for Traffic Control, or PD for Police
Duties, GL for Get Lost, or something. ;-)

Regards,
Fergus


Nov 20 '05 #19

P: n/a
Hello,

"Cor" <no*@non.com> schrieb:
I try and the OT you asked, if it was EOT was OT, I had done
an OT message to you.


I don't really understand you.

EOT = End Of Thread
OT = Off Topic

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #20

P: n/a
"Fergus Cooney" <fi******@tesco.net> schrieb

At least in the chat there's the possibility of a laugh and some
fun.
These redirections, though, ... :-(

Actually, I think you should use TC for Traffic Control, or PD
for Police
Duties, GL for Get Lost, or something. ;-)


You should quote what you are referring to. I don't understand you, but,
don't worry, I don't have to. :-)
--
Armin

Nov 20 '05 #21

P: n/a
Cor
Herfried,
EOT = End Of Thread
OT = Off Topic


Yes I know, but you had asked me last night if I did mean EOT when I had
written OT, and it was not.
I had special used OT. And because I did want to have the thread an EOT, I
did not answer you.
:-)) little things are the most difficult to explain.
Cor
Nov 20 '05 #22

P: n/a
Cor
Hi Fergus,

Let's not make it to serious.
Armin is not the one for non serious things, let's reminds us that.
I did make that same mistake yesterday.
He is giving a lot of help here and tries to do it very good.
But he has his strict rules and does it according that rules.
(Although Armin changes them little by little in a direction we like)
We have to give him time and our respect for that.

Cor

PS. And we help him of course in the good direction.
:-)))
Nov 20 '05 #23

P: n/a
See

http://trigeminal.com/codes.asp?ItemID=6

for a working example. How this person expects to use EbExecuteLine in
VB.Net is beyond me -- reflection is the way to go for this kind of
thing....
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:ez*************@tk2msftngp13.phx.gbl...
Hello,

"Armin Zingler" <az*******@freenet.de> schrieb:
If he was using VB.NET, he wouldn't write "It is working in my project".
But you are right, I ignored "VBA6.dll" - probably because I couldn't

image
that anybody would ever do this to a VB.NET application. :)


I could not even get this function work correctly with VB6.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #24

P: n/a
Hello,

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> schrieb:
http://trigeminal.com/codes.asp?ItemID=6

for a working example. How this person expects to use
EbExecuteLine in VB.Net is beyond me -- reflection
is the way to go for this kind of thing....


When compiling the code using VB6 and calling the function, it causes a
_crash_ in the compiled application. It works fine in the IDE.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #25

P: n/a
"Fergus Cooney" <fi******@tesco.net> schrieb

At least in the chat there's the possibility of a laugh and some
fun.
These redirections, though, ... :-(

Actually, I think you should use TC for Traffic Control, or PD
for Police
Duties, GL for Get Lost, or something. ;-)


You should quote what you are referring to. I don't understand you, but,
don't worry, I don't have to. :-)
--
Armin

Nov 20 '05 #26

P: n/a
Cor
Hi Fergus,

Let's not make it to serious.
Armin is not the one for non serious things, let's reminds us that.
I did make that same mistake yesterday.
He is giving a lot of help here and tries to do it very good.
But he has his strict rules and does it according that rules.
(Although Armin changes them little by little in a direction we like)
We have to give him time and our respect for that.

Cor

PS. And we help him of course in the good direction.
:-)))
Nov 20 '05 #27

P: n/a
See

http://trigeminal.com/codes.asp?ItemID=6

for a working example. How this person expects to use EbExecuteLine in
VB.Net is beyond me -- reflection is the way to go for this kind of
thing....
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:ez*************@tk2msftngp13.phx.gbl...
Hello,

"Armin Zingler" <az*******@freenet.de> schrieb:
If he was using VB.NET, he wouldn't write "It is working in my project".
But you are right, I ignored "VBA6.dll" - probably because I couldn't

image
that anybody would ever do this to a VB.NET application. :)


I could not even get this function work correctly with VB6.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #28

P: n/a
Hello,

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> schrieb:
http://trigeminal.com/codes.asp?ItemID=6

for a working example. How this person expects to use
EbExecuteLine in VB.Net is beyond me -- reflection
is the way to go for this kind of thing....


When compiling the code using VB6 and calling the function, it causes a
_crash_ in the compiled application. It works fine in the IDE.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #29

P: n/a
Did you read the explanation of wher the code is intended? It is intended
for VB ADD-INS, where vba6.dll is in use. That DLL is not in use in the
runtime for compiled apps, thus you crash since you were trying to use it
incorrectly.....
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:eq**************@TK2MSFTNGP09.phx.gbl...
Hello,

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> schrieb:
http://trigeminal.com/codes.asp?ItemID=6

for a working example. How this person expects to use
EbExecuteLine in VB.Net is beyond me -- reflection
is the way to go for this kind of thing....


When compiling the code using VB6 and calling the function, it causes a
_crash_ in the compiled application. It works fine in the IDE.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #30

P: n/a
I assume they are just looking for the functionality.... thus reflection.
:-)
--
MichKa [MS]

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Herfried K. Wagner [MVP]" <hi*******@m.activevb.de> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hello,

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> schrieb:
Did you read the explanation of wher the code is intended?
It is intended for VB ADD-INS, where vba6.dll is in use.
That DLL is not in use in the runtime for compiled apps, thus
you crash since you were trying to use it incorrectly.....


I know, that's why I asked why the OP wanted to use the function in a .NET
application.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet

Nov 20 '05 #31

This discussion thread is closed

Replies have been disabled for this discussion.