Page 2 of 2 <12
Topic Options
#193139 - 2009-03-25 01:26 AM Re: Help with DynaWrap/DynaCall... [Re: Viggen]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Had a thought, and as long as your machines have .net 2.0 this might work for you ... I took the .Net version of the BCP control and "wrapped" it inside a .NET COM object ... a wrappper class ... then put the whole thing inside an MSI because registering these assemblies can be a real pain ... here's the MSI:

BCPWrapper

Download and install it, if it installs ok then run the script below. I can't test this obviously, have my fingers crossed ...

 Code:
Break On

$BCPController = CreateObject("BCPWrapper.BCPController")

$rv = $BCPController.OpenBCP("COM12", "1234")

$text = $BCPController.UploadData()

?"text = " + $text

$BCPController.Close

Exit 0


Top
#193142 - 2009-03-25 03:23 AM Re: Help with DynaWrap/DynaCall... [Re: Shawn]
Benny69 Offline
Moderator
*****

Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
I think I can safely say, that I speak for most on this board when I say, ‘Shawn we are lucky to have you around, Thanks for being there for us.’

;\)
_________________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)

Top
#193144 - 2009-03-25 08:02 AM Re: Help with DynaWrap/DynaCall... [Re: Shawn]
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
well... where should I start...


hmmm...

let me try this... THANK YOU!!!

It works great!   

Thank you so much for all your help!


/Viggen

Top
#193146 - 2009-03-25 09:58 AM Re: Help with DynaWrap/DynaCall... [Re: Viggen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
lol.
talk about silver platter...
not only did Shawn provided the working stuff, he even wrapped it with a installer. woot.
_________________________
!

download KiXnet

Top
#193149 - 2009-03-25 10:35 AM Re: Help with DynaWrap/DynaCall... [Re: Lonkero]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
woohoo glad it worked. I can quickly add the erasedata method and anything else you might need. let just me know.

I will also provide you with the vs2005 project so that you can support it going forward ...


Top
#193151 - 2009-03-25 10:54 AM Re: Help with DynaWrap/DynaCall... [Re: Shawn]
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
I can't thank you enough Shawn!

The only thing that is needed right now is the erase method.

The vs2005 project would be a great way to learn a bit more about theese things \:\)

Thank you again!

/Viggen

Top
#193167 - 2009-03-25 08:20 PM Re: Help with DynaWrap/DynaCall... [Re: Viggen]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
wow... Viggen - you don't know how lucky you are. Shawn used to be here and post dozens of times every day, but for a while now there have been weeks or months that he has not stopped by or posted.

Thanks for being here again and helping Shawn.

Top
#193171 - 2009-03-25 10:27 PM Re: Help with DynaWrap/DynaCall... [Re: NTDOC]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hey man no problems. The THANKS viggen gave made it all worthwhile ... many times over and I mean that ...

I posted a new build its available in a zip here:

BCPWwrapper.zip

It includes a new MSI and a ZIP of the entire project with source code so you should be able to change and rebuild yourself. The project consists of two sub-projects ... the wrapper itself and the MSI builder (setup1) ... if you have any questions feel free to shoot me a PM ...

Made two changes to the wrapper:

1) Renamed the OpenBCP method to just Open - thats to be consistent with the Close method and because thats what the real methods are called under-the-covers - just for consistency.

2) Added the EraseData method.

Here's some new source ...

 Code:
Break On

$BCPController = CreateObject("BCPWrapper.BCPController")

$bool = $BCPController.Open("COM12", "1234")

$text = $BCPController.UploadData()

?"text = " + $text

$bool = $BCPController.EraseData

$BCPController.Close

Exit 0


And like I said, any questions or even if you want me to add some new methods properties - let me know ...

-Shawn

Top
#193172 - 2009-03-26 09:59 AM Re: Help with DynaWrap/DynaCall... [Re: Shawn]
Viggen Offline
Starting to like KiXtart

Registered: 2002-03-22
Posts: 110
Thanks again!

Just tried the new build, and the EraseData method works perfect.
however...

The Open method dosen't... OpenBCP is still there ;\)

So this will be a perfect way for me to get acquainted with the source code.  

/Viggen

Top
Page 2 of 2 <12


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 557 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.059 seconds in which 0.024 seconds were spent on a total of 15 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org