PureBytes Links
Trading Reference Links
|
Thanks Dingo - I have a pending membership for the dll forum for
some days now... but have not yet been allowed in, so can't follow
your link.. any chance you can paste one of the examples here?
regards, Jens
--- In amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxx> wrote:
>
> I got the following msg from the DLL forum:
>
> http://groups.yahoo.com/group/amibroker-dll/messages/
>
> There are several others - why not go there and some searching -
there are
> severl other msgs re C#
>
> d
>
>
> _____
>
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx]
On Behalf
> Of tiedemj
> Sent: Tuesday, February 07, 2006 3:01 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Amibroker Automation Object Model and C#
in Visual
> Studio 2005
>
>
> Thanks Tomasz...!
>
> You might consider the "Shared assembly" approach - as it (if I
get
> it right) seems to offer the best of two (binding) worlds: Version
> independence - but preserving the integrity of the automation
code,
> as well as providing Intellisense features giving clues to correct
> calls to methods and properties. If interested, I would be happy
to
> e-mail you a few (scanned) pages on the topic i found in "Visual
C#
> 2005" book (Wrox) You can get me at jens@xxx
>
> I did try the example you gave (very simple - new windows project -
> add a button, copy/paste the code - and add the "using
> System.Reflection;" statement in the top - now run/debug... But
only
> to get "Exception has been thrown by the target of an
invocation." -
> so i'm really not having a lot of luck... (yes, have office
> installed... all applications running...)
>
> Is there nobody else than Tomasz (who really should not spend his
> time teaching a newbee like me about general COM bindings) who's
> using the object model in C# - and can give me the code lines
> (including any "using" statements and other necessary
preparations)
> for
>
> ---------------------------------
> Broker.Application ab = new Broker.Application();
> string currentPath = ab.DatabasePath;
> ---------------------------------
>
> or any other example showing how to exploit the AmiBroker object
> model in C#???
>
> Thanks and regards
> Jens Tiedemann
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@>
> wrote:
> >
> > Hello,
> >
> > No you don't need all that. There are plenty of documents on
> Microsoft site
> > that explain how to use late binding in C# .NET
> > for example:
> > http://support.microsoft.com/kb/302902/
> >
> > (all documents that cover "how to link to
> Excel/Access/Word/Powerpoint"
> > apply to any other out-proc OLE server, including AmiBroker)
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "tiedemj" <home@>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Monday, February 06, 2006 9:44 PM
> > Subject: [amibroker] Re: Amibroker Automation Object Model and
C#
> in Visual Studio 2005
> >
> >
> > > still digging... for broker.tlb (dll) to be usable for all
> visual
> > > studio programming languages, it seems it needs to be provided
> as
> > > a "shared assembly". A shared assembly needs "Strong names" -
> that
> > > is, the dll needs to be signed with a public/private key. This
> can
> > > be done once in Visual Studio 2005, by
> > >
> > > 1. generating a key with the "sn" utility
> > > 2. signing the broker project using the signing tab in project
> > > properties(only Tomasz would be able to do this)
> > > 3. once recompiled, the (signed) assembly can now be made
> universaly
> > > available through the global assembly cache by copy to
> > > windows\assembly (XP)
> > >
> > > OR - am I digging in the wrong direction - and there is a much
> > > simpler solution to use the amibroker object model in
C#/Visual
> > > Studio with late binding that just escapes me?
> > >
> > > regards
> > > Jens Tiedemann
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "tiedemj" <home@> wrote:
> > >>
> > >> OK - Great - and thanks! Now - how do I do latebinding of the
> > > Object
> > >> Model in C# using createObject. So what do I need to type to
> get
> > > the
> > >> example:
> > >>
> > >> ----------------------------
> > >> Broker.Application ab = new Broker.Application();
> > >> string currentPath = ab.DatabasePath;
> > >> ----------------------------
> > >>
> > >> to work - and what "using" statements etc. will provide the
> type
> > >> interface/suggestions/methods "lookup" when typing code? I've
> been
> > >> at it for almost a week now with no luck, probably mostly due
> to
> > > the
> > >> fact that I'm a newbee at using "foreign" COM objects in C# -
> so
> > > it
> > >> might be something very simple I'm not getting...
> > >>
> > >> Thanks
> > >> Jens Tiedemann
> > >>
> > >>
> > >> --- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko"
> <amibroker@>
> > >> wrote:
> > >> >
> > >> > Hello,
> > >> >
> > >> > Late binding (via CreateObject()) is the only recommended
way
> > >> since interface may change
> > >> > and all .tlb dependent programs may need recompilation.
With
> > > Late
> > >> binding your code will
> > >> > be backward and forward compatible with any AB version.
> > >> >
> > >> > Best regards,
> > >> > Tomasz Janeczko
> > >> > amibroker.com
> > >> > ----- Original Message -----
> > >> > From: "William Peters" <william@>
> > >> > To: "tiedemj" <amibroker@xxxxxxxxxxxxxxx>
> > >> > Sent: Monday, February 06, 2006 6:27 PM
> > >> > Subject: Re: [amibroker] Amibroker Automation Object Model
> and
> > > C#
> > >> in Visual Studio 2005
> > >> >
> > >> >
> > >> > >
> > >> > > The same error occurs in VB 2005. After spending a week
> > >> researching
> > >> > > the issue I gave up and now use late binding.
> > >> > >
> > >> > >
> > >> > >
> > >> > > Regards,
> > >> > > William Peters
> > >> > > http://www.amitools.com
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > Monday, February 6, 2006, 11:58:05 AM, you wrote:
> > >> > > t> Hi there.
> > >> > >
> > >> > > t> Anybody having an example of the Object Model being
> used
> > > in
> > >> C# from
> > >> > > t> Visual Studio? I can't get the following to work
(after
> > >> reference to
> > >> > > t> broker.dll made from broker.tlb using imptlb.exe)...
> > >> > >
> > >> > > t> The following c# code:
> > >> > > t> ----------------------
> > >> > > t> using Broker
> > >> > > t> Broker.Application ab = new Broker.Application();
> > >> > > t> string currentPath = ab.DatabasePath;
> > >> > > t> ----------------------
> > >> > >
> > >> > > t> throws the following exeption:
> > >> > >
> > >> > > t> System.InvalidCastException was unhandled
> > >> > > t> Message="Unable to cast COM object of
> > >> > > t> type 'Broker.ApplicationClass' to interface
> > >> > > t> type 'Broker.IApplication'. This operation failed
> because
> > > the
> > >> > > t> QueryInterface call on the COM component for the
> interface
> > >> with
> > >> > > t> IID '{2DCDD57B-9CC9-11D3-BF72-00C0DFE30718}' failed
due
> to
> > >> the
> > >> > > t> following error: No such interface supported
(Exception
> > > from
> > >> > > t> HRESULT: 0x80004002 (E_NOINTERFACE))."
> > >> > >
> > >> > >
> > >> > > t> What am I doing wrong? Also, would like to use late
> > > binding -
> > >> but
> > >> > > t> think using broker.tlb means early binding - or?
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > Please note that this group is for discussion between
users
> > > only.
> > >> > >
> > >> > > To get support from AmiBroker please send an e-mail
> directly
> > > to
> > >> > > SUPPORT {at} amibroker.com
> > >> > >
> > >> > > For other support material please check also:
> > >> > > http://www.amibroker.com/support.html
> > >> > >
> > >> > >
> > >> > > Yahoo! Groups Links
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Please note that this group is for discussion between users
only.
> > >
> > > To get support from AmiBroker please send an e-mail directly
to
> > > SUPPORT {at} amibroker.com
> > >
> > > For other support material please check also:
> > > http://www.amibroker.com/support.html
> > >
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
>
>
>
>
> SPONSORED LINKS
> Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+management+software&w1=Inves
>
tment+management+software&w2=Real+estate+investment+software&w3=Inves
tment+p
>
roperty+software&w4=Software+support&w5=Real+estate+investment+analys
is+soft
> ware&w6=Investment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZNcMu4KNQ>
> management software Real
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+software&w1=Inve
>
stment+management+software&w2=Real+estate+investment+software&w3=Inve
stment+
>
property+software&w4=Software+support&w5=Real+estate+investment+analy
sis+sof
>
tware&w6=Investment+software&c=6&s=200&.sig=5_sgDczz3ArKGMtJ9tFSJA>
estate
> investment software Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+property+software&w1=Investm
>
ent+management+software&w2=Real+estate+investment+software&w3=Investm
ent+pro
>
perty+software&w4=Software+support&w5=Real+estate+investment+analysis
+softwa
> re&w6=Investment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6oX5WZw>
property
> software
> Software
> <http://groups.yahoo.com/gads?
t=ms&k=Software+support&w1=Investment+manageme
>
nt+software&w2=Real+estate+investment+software&w3=Investment+property
+softwa
>
re&w4=Software+support&w5=Real+estate+investment+analysis+software&w6
=Invest
> ment+software&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w> support Real
> <http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+analysis+softwar
>
e&w1=Investment+management+software&w2=Real+estate+investment+softwar
e&w3=In
>
vestment+property+software&w4=Software+support&w5=Real+estate+investm
ent+ana
>
lysis+software&w6=Investment+software&c=6&s=200&.sig=GmF8PlAJASx0wrSa
X5-Zlw>
> estate investment analysis software Investment
> <http://groups.yahoo.com/gads?
t=ms&k=Investment+software&w1=Investment+manag
>
ement+software&w2=Real+estate+investment+software&w3=Investment+prope
rty+sof
>
tware&w4=Software+support&w5=Real+estate+investment+analysis+software
&w6=Inv
> estment+software&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg> software
>
> _____
>
> YAHOO! GROUPS LINKS
>
>
>
> * Visit your group "amibroker
> <http://groups.yahoo.com/group/amibroker> " on the web.
>
>
> * To unsubscribe from this group, send an email to:
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
>
>
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service
> <http://docs.yahoo.com/info/terms/> .
>
>
> _____
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|