Author Topic: Couple Api ideas for embedding  (Read 92348 times)

dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #30 on: June 16, 2014, 06:15:00 PM »

oghh no sorry, wasnt clear.

The precompiled com.dll will work fine.

I just meant If you want to play around and recompile the com.dll for some reason using the provided solution file.

dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #31 on: June 16, 2014, 06:17:03 PM »
if it said callbacks werent registered its probably because you forgot to register the vb6_example.dll again with regsvr32
since the interface has changed the clsids in teh registry have changed as well so it must be reregistered

Code: [Select]
C:\scriptbasic\bin>scriba COM_VB6_CallBack_Example.sb
obj = 1416200
oCollection = 1418968
Back in script basic Button1_Click arg=21
Back in script basic Button1_Click arg=22
Back in script basic Button1_Click arg=23
Back in script basic Button1_Click arg=24
Back in script basic Button2_Click arg=25
Back in script basic Button2_Click arg=50
Back in script basic Button2_Click arg=100
Back in script basic Button2_Click arg=200
LaunchCallBackForm returned 400
test complete!

« Last Edit: June 16, 2014, 06:19:32 PM by dzzie »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Couple Api ideas for embedding
« Reply #32 on: June 16, 2014, 06:19:16 PM »
I thought that is what you meant. Didn't want to scare anyone away before it's out of the kitchen.  :)

Can you confirm the output I posted was what you expected?

With each release I put it in a sub-directory of sbcom. I then regsrv the DLL again due to it's new location.


dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #33 on: June 16, 2014, 06:20:48 PM »
also the currently unsupported VT return type: 9 message shows it was an old version of com.dll that was loaded

actually sorry i will still need a little more work on this..when I switched over to release build a setting didnt carry over
and the last couple tweaks I was still testing the old debug build :(

thats what I get for being fancy and using a post build command to install the extension for me
« Last Edit: June 16, 2014, 06:25:31 PM by dzzie »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Couple Api ideas for embedding
« Reply #34 on: June 16, 2014, 06:25:06 PM »
I re registered it again but it still says the script writer forgot to register the callback handler.

I'm on the #AllBASIC IRC (see link for web client in  upper right corner of forum) if that would be better to resolve this.

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Couple Api ideas for embedding
« Reply #35 on: June 16, 2014, 06:34:12 PM »
I forgot to copy the com.dll to the SB modules directory. I also copied the com.inc to the include directory. Now it GPF's.  :'(

dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #36 on: June 16, 2014, 06:37:17 PM »
ok sorry about that, I am at the end of a 15hr day :(

it was a last minute change i had made and thought it tested fine this should be it.


Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Couple Api ideas for embedding
« Reply #37 on: June 16, 2014, 06:44:00 PM »
1. Over wrote directory with new zip.
2. Copied com.dll to modules dir.
3. Copied com.inc to include dir.
4. Re-registered VB6_Example.dll.

GPF after I press one of the callback test buttons.

C:\SB22\sbcom\sbvb3>scriba COM_VB6_CallBack_Example.sb
obj = 1414352
oCollection = 1414432

C:\SB22\sbcom\sbvb3>

dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #38 on: June 16, 2014, 06:45:28 PM »
in other news, I will make a quick screen cast video tomorrow on debugging with the visual studio IDE.
It has amazing debugging tools, I am so spoiled by them now.

Last project I worked on was a gcc/cygwin build. I spent like 2 weeks of vacation solid
converting it over to compile under VS fighting through all kinds of obscure errors just so I could get
to use the VS debugging tools for future dev on it. 

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Couple Api ideas for embedding
« Reply #39 on: June 16, 2014, 06:47:15 PM »
I have Visual Studio 2013 on Win7 64 and VS2008 on XP.

I really like using MinGW-GCC-TDM.
« Last Edit: June 16, 2014, 06:49:08 PM by support »

dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #40 on: June 16, 2014, 06:48:55 PM »
you might have to compile COM.dll for your system then if your version of scriba.exe is built from newer sources
than mine. If anything changed in the pSupportTable offsets, or pProgram offsets or pExecutionObject table offsets
it would be a guaranteed crash

The scriba I compiled against is

File:     scriba.exe
Size:     507904
MD5:      3DCCF6B74C1846CB7EC08E7F657279DB
Compiled: Sat, Sep 12 2009, 3:19:33  - 32 Bit EXE

must sleep now will resume the fight in teh am

ok mailed, the exe I am using is from the public download
« Last Edit: June 16, 2014, 06:54:55 PM by dzzie »

Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Couple Api ideas for embedding
« Reply #41 on: June 16, 2014, 06:50:13 PM »
Please e-mail me the scriba.exe you are using.

What I'm using.

C:\SB22\sbcom\sbvb3>scriba -v
ScriptBasic v2.2
Variation >>Windows32<< build 2
Magic value 859012665
Node size is 16
Extension interface version is 11
Compilation: Nov  9 2012 18:29:05
Executable: C:\SB22\bin\scriba.exe

C:\SB22\sbcom\sbvb3>

Here is a later compiled version but still GPF's.

C:\SB22\sbcom\sbvb3>scriba -v
ScriptBasic v2.2
Variation >>Windows32<< build 2
Magic value 859001395
Node size is 16
Extension interface version is 11
Compilation: May  3 2014 21:45:37
Executable: C:\SB22\bin\scriba.exe
« Last Edit: June 16, 2014, 06:56:53 PM by support »

dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #42 on: June 16, 2014, 07:05:49 PM »
emailed, this one tested as working too

http://www.scriptbasic.org/download/SB_2.1_RC2_Win.zip

File:     scriba.exe
Size:     507904
MD5:      E2E283CCAE0C493B29634984C302B5FE
Compiled: Sat, Sep 12 2009, 3:19:33  - 32 Bit EXE


Support

  • Administrator
  • *****
  • Posts: 22
    • View Profile
Re: Couple Api ideas for embedding
« Reply #43 on: June 16, 2014, 07:16:01 PM »
Yours worked. STRANGE !!!

C:\SB22\sbcom\sbvb3>scriba COM_VB6_CallBack_Example.sb
obj = 1413952
oCollection = 1414112
Back in script basic Button1_Click arg=21
Back in script basic Button2_Click arg=22
LaunchCallBackForm returned 44
test complete!

C:\SB22\sbcom\sbvb3>

You're using the 2.1 (OLD) version of scriba.exe. I think that was compiled with VC7 or VC9. The SB 2.2 was compiled with VC10 from the Win7 SDK.

C:\SB22\sbcom\sbvb3>scriba -v
ScriptBasic v2.1
Variation >>STANDARD<< build 1
Magic value 859034417
Node size is 16
Extension interface version is 11
Compilation: Sep 11 2009 23:19:32
Executable: C:\SB22\bin\scriba.exe

C:\SB22\sbcom\sbvb3>
« Last Edit: June 16, 2014, 07:23:41 PM by support »

dzzie

  • Guest
Re: Couple Api ideas for embedding
« Reply #44 on: June 16, 2014, 07:55:03 PM »
My money is on internal structures must have changed offsets from a new pointer added to a structure or something.

Here is the VS2008 crash course video on setup and debugging. Set HD quality for best viewing.

http://youtu.be/ZNiKYCDNqV8

Note that the video capture software did not record the mouse over variable popups for some reason. If you hear me pulling numbers out of thin air, its because a tool tip window was displaying variable values to me on mouse over

ok now I am going to sleep for real this time :)