|
Dang. I wish I had seen your message before I left for work. I have to fix it from home... :/
I'll see what I can arrange here, but I can't rightly know if I remember the password to my ftp account.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Okay, I changed it to a zip file and the link in the original mesage is correct now.
BTW, the sample C++ app is dialog based and displays the install status of each sim in a list box. If you need more info on the DLL, let me know.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hmm. I can't seem to get it to work.
Private Declare Function vbGetDllVersion Lib "D3SimInstalled" Alias "GetDllVersion" () As Variant<br />
<br />
Private Sub Form_Load()<br />
Dim ver As Integer<br />
ver = vbGetDllVersion<br />
Debug.Print ver<br />
End Sub
is returning 0 for the version number. The rest of the functions are returning empty strings.
Michael
CP Blog [^]
|
|
|
|
|
Hmmmm...
Does VB automatically cast a variant to the variable's defined type?
Could I have my export macros implemented incorrectly?
I'm using this
VARIANT PASCAL EXPORT FunctionName()
and the def file has the function name in the EXPORTS section, and the C++ sample works fine.
:/
Any suggestions on what to check?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Could it be that I don't have the ordinals in the def file?
I have this:
FunctionName
instead of this:
FunctionName @1
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I'm no expert on this. I usually do most of my VB/VC++ communicating via COM.
My first thought is that the data has simply gone out of scope. I'm back on my main machine now, so I'll try again and see if I get different results. I'm tempted also to try with VB.NET and see if that performs the same.
Of course, the easiest way to track down the problem is to debug into the dll from the VB call - but you'd have to install VB6 to try that
Michael
CP Blog [^]
|
|
|
|
|
How about if I convince you to create a simple sample app in vb that does pretty much what the c++ sample does, compile it and email it to me?
When it works, I'll know my DLL is tits.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote:
How about if I convince you to create a simple sample app in vb that does pretty much what the c++ sample does, compile it and email it to me?
Yeah. That's not a problem. It'll take me some time but I can do that. The only bitch is that ListViewCtrl is a pain to use in VB, but I'll get is stored for you.
Michael
CP Blog [^]
|
|
|
|
|
Would a multi-line edit field be better with each string on it's own line?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Ignore everything I've said. I've retried your dll and all the string functions are returning correct values. The version number is wrong though. It is being returned empty.
I'll finish up the app so you can test but everything seems okay now apart from the version.
Michael
CP Blog [^]
|
|
|
|
|
That's great news.
I wonder why the version number wouldn't be working...
Can I get the source to your sample app as well? I would like to provide it in the zip file so that VB programmers won't be bothering me too much.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
I've emailed you the app and the vb project too. Let me know if you don't get it.
Michael
CP Blog [^]
|
|
|
|
|
It's 9pm here in texas, and it still hasn't arrived at my inbox. Try sending to john.simmons at intellicacorp.com
Thanks again for your help.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Okay. It is on its way now.
Michael
CP Blog [^]
|
|
|
|
|
Firstly, the application that i developed closes forcibly when i press ENTER. which event should i handle so that the the application does respond to ENTER command.
Secondly, from the task manager when i select my application and do end process, the application closes forcibly. Which event should i handle in these case so that my app does some clean-up operation which i would like to do on exit.
ask_you
|
|
|
|
|
Firstly, the application that i developed closes forcibly when i press ENTER. which event should i handle so that the the application does respond to ENTER command.
My guess is that you are writing a dialog-based app and there's an OK button in it. The easy way to prevent the program from closing when you hit ENTER is to
1) change the ID of the OK button from IDOK to IDC_OK
2) Delete the OnOK handler from your code.
3) Add a new handler for IDC_OK.
Of course, there may be other ways to accomplish the same end, but I'm not really in a position to suggest anything more complex right now.
----------
Secondly, from the task manager when i select my application and do end process, the application closes forcibly. Which event should i handle in these case so that my app does some clean-up operation which i would like to do on exit.
Handdle cleanup in the destructor of the dialog if possible. If you need to, you can also use the destructor for the app, or even OnExitInstance.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
1. i do not have any OK button in my application. so can any1 suggest how to handle the event on pressing the ENTER command..
2. i tried to enter clean-up in the destructor. it doesn't work I don't know about OnExitInstance. Can u elaborate?
|
|
|
|
|
Well, you haven't even described your application, so how the hell can I (or anyone) help you?
WHY does your program close down when you press ENTER?
One final note - show us some freakin respect and SPELL everything out. You're not texting over a goddamn phone, so "any1" and "u" are not acceptable and only serve to annoy the literate members of this board.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
there is nothing much to speak out. its a dialog based app without any OK. The application minimizes to the tray when i click on the close. In the tray when it is minimized, i create a pop-up menu on right-clicking the icon. From this menu i exit.....
Now, my application closes on pressing ENTER. if i knew why it closes, i would not have posted a message in this forum. My intention was never to annoy literate members in this board...
ask_you
|
|
|
|
|
Is it dialog based? Then you probably deleted the OK and CANCEL button of the resources?
Override the OnOK function (and leave it empty if it doesn't need to do something)
If it fails try also overriding the OnCancel function.
hope it helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
Thanx V.
I had removed the OK button from the dialog box.. but its implementation remained!!! I commented it. it worked... thanx
but my other question remains...
how to handle the event in my when someone does end process from the task manager.. Is it possible to handle??
|
|
|
|
|
ask_you wrote:
I had removed the OK button from the dialog box.. but its implementation remained!!!
==> MICROSOFT
ask_you wrote:
how to handle the event in my when someone does end process from the task manager.. Is it possible to handle??
Destructor/Dispose I think I wouldn't know. sorry.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
ask_you wrote:
1. i do not have any OK button in my application.
So is it a dialog-based application or not?
ask_you wrote:
2. i tried to enter clean-up in the destructor. it doesn't work
Which object's destructor?
ask_you wrote:
I don't know about OnExitInstance. Can u elaborate?
See here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
ask_you wrote:
Secondly, from the task manager when i select my application and do end process, the application closes forcibly. Which event should i handle in these case so that my app does some clean-up operation which i would like to do on exit.
I'm half-surprised that when killing an application with the task manager it does not go thrue the exitinstance method !?!?!
maybe have a look at signal and handle SIGTERM
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Did you see that he said "end the process"? There's two ways to stop an app in task manager, and he implies that he's using the "End Process" button on the Processes tab. When you do that, Task Manager displays a warning that this is a last-resort method for shutting an app down because it DOES NOT DO CLEANUP. His app is probably freezing up tighter than a 40-year-old virgin, forcing him to use End Process on it.
If the original poster was better at communication, this thread wouldn't be as long as it is, and he would at least be looking for the real problem instead of trying to hide it by trying to fudge in some clean-up code.
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|