|
Dear All
I need to make an ocx to be container to RICHTX32.OCX special using VB 6 or Vb.net
text prop
DataSource Prop
DataField Prop
any tips for that ?????
thanks
bye
|
|
|
|
|
I'm trying to do some Powerpoint automation from an ASP.NET page and generate/modify a slide. That piece of the code works fine but when it's all done running and even after I call the Quit() method on the powerpoint application object, POWERPOINT.EXE remains running and eventually this is causing problems. I've googled this extensively and nothing I've found has seemed to help. I really need this to work properly.
Here's my relevant code. I don't believe i'm using any Global references and I've even removed the COM reference from my website to use Late Binding instead in hopes that it would solve my problems as mentioned in this MSDN Article: http://support.microsoft.com/default.aspx?scid=kb;en-us;319832
Code:
Public Function GenerateDrillDown(ByVal strFileName As String) As Boolean<br />
Dim App As Object = Nothing<br />
Dim pres As Object = Nothing<br />
Dim slide As Object = Nothing<br />
<br />
Try<br />
App = CreateObject("PowerPoint.Application")<br />
App.Visible = -1 ' For debugging. Comment this out or set to 0 to keep the application from being visible.<br />
<br />
pres = App.Presentations.Open("C:\DevProjects\Docs\DrillDown.ppt", 0, -1, -1)<br />
slide = pres.Slides(1) ' There's only one slide in this ppt i'm using as the template.<br />
<br />
slide.Shapes.Item("Text Box 8").TextFrame.TextRange.Text = DecisionTitle ' These are all string variables<br />
slide.Shapes.Item("Text Box 13").TextFrame.TextRange.Text = Narrative<br />
slide.Shapes.Item("Text Box 14").TextFrame.TextRange.Text = Issues<br />
slide.Shapes.Item("Text Box 19").TextFrame.TextRange.Text = Scope<br />
<br />
If TopicType = 1 Then<br />
slide.Shapes.Item("Autoshape 9").TextFrame.TextRange.Text = IDNumber.ToString()<br />
slide.Shapes.Item("Autoshape 9").Visible = -1<br />
slide.Shapes.Item("Autoshape 56").Visible = 0<br />
ElseIf TopicType = 2 Then<br />
slide.Shapes.Item("Autoshape 56").TextFrame.TextRange.Text = "ST" & IDNumber.ToString()<br />
slide.Shapes.Item("Autoshape 56").Visible = -1<br />
slide.Shapes.Item("Autoshape 9").Visible = 0<br />
End If<br />
<br />
pres.SaveAs(strFilename, 1, 0)<br />
Catch ex As Exception<br />
Return False<br />
Finally<br />
' Most of this is coming from another article I found online to help combat the problem of open references with office automation.<br />
GC.Collect()<br />
GC.WaitForPendingFinalizers()<br />
GC.Collect() ' Intentionally repeated<br />
GC.WaitForPendingFinalizers() <br />
If Not slide Is Nothing Then<br />
Marshal.FinalReleaseComObject(slide)<br />
slide = Nothing<br />
End If<br />
<br />
If Not pres Is Nothing Then<br />
pres.Close()<br />
Masrhal.FinalReleaseComObject(pres)<br />
pres = Nothing<br />
End If<br />
<br />
If Not App Is Nothing Then<br />
App.Quit() ' This doesn't do anything, no errors but ap stays open<br />
Marshal.FInalReleaseComObject(App)<br />
App = Nothing<br />
End If<br />
End Try<br />
<br />
Return True<br />
End Function
Please give me some guidance as this is an important piece of functionality required by my project. Thanks!
|
|
|
|
|
Hi,
I have a problem with pinvoke in c# trying to create a VST host.
A VST host is a little program able to use a dll which is actually
an audio effect applicable on a wave file. The dll exports only
one function : main. When you call this function it returns a
pointer to a structure that lists the capabilities of the
particular audio effect.
My problem is that whatever I try, I just can't get the pointer
that the dll is returning. I know that the call works because
I supply a Delegate to the function which in turns calls the function
in my program.
Is there anyone out there who has tried something similar or who
is a master of Interop who can help me on this topic?
Jean
|
|
|
|
|
A couple of months ago I wrote an application that acts as a host for the Cakewalk DXi Audio Plug In. The source is entirely different from the VST, but the Plug In concept is similar. Both the VST and the DXi are written as unmanaged COM Dlls (you know this, obviously). So, naturally, writing a host is alot easier in an unmanaged language.
The easiest approach is to convert your VST Plug In to a NET assembly by using the Type Library Import Utility (tlbimp.exe[^]) shipped with SDK. This creates an assembly that you can then reference and use directly with your host application.
A better approach would be to write your host in Unmanaged C++; sometimes the function types generated by the Type Library Import Utility are just too cumbersome to use easily.
You might read this: Importing a Type Library as an Assembly[^]. I'm assuming that the VST DLL contains a type library. If not, you'll have to write your audio host in unmanaged C++ (unless you want to write your own Runtime Callable Wrappers, which is a very tedious and error-prone process; if you are a novice at Interop, I wouldn't recomment it).
Good Luck.
-- modified at 17:18 Thursday 25th October, 2007
|
|
|
|
|
http://vstnet.codeplex.com
VST.NET allows you to write a VST host in managed code (C#/VB.NET). Check out the Host sample that is available. VST.NET will take care of all the marshaling between unmanaged and managed code so you do not need to call P/Invoke's. Note that VST.NET only supports VST 2.4.
VST.NET also supports writing VST plugins.
|
|
|
|
|
while registering registry i am getting it is succeded but when i am going to search the CLSID of the same it doesnt gives...whats wrong here???
shailesh
|
|
|
|
|
verify your search settings - specifically, shorten your search string....
Charlie Gilley
Will program for food...
|
|
|
|
|
Search by the guid u used for the component.
Prasann
who else
|
|
|
|
|
Dear Shaileshvb,
If you get it success while registering .... I guess you are trying to search the CLSID manually. If so ... then have tried searching it by selecting cmd --->RegEdit ---> Edit ---> Find ---> Enter the CLSID you are searching for ....
Thanks,
Arindam D Tewary
|
|
|
|
|
Name your price... as God is my witness, I hate anything to do with the web...
I have an activeX control in VC++. I want to call it from VBScript. This activeX control
has properties (they work fine). It also as get/set methods. The set's work fine. I cannot seem
to find the right mojo to return a value from the activeX control... I know VBScript's calling convention is VARIANTs only. Fine.
So, what arguments do I pick for my method so that I can return a value? In straight C++, I would pass by reference or by pointer.
If I call from VBScript:
DIM myInteger
call myCtrl.getValue(myInteger)
I want my C++ code to drop something into a data structure such that VBScript actually receives the results. Anyone willing to trade a code snippet for a case of beer? Flowers in the event you're a lady? Not to be sexist, but if you want the beer, I'm good with that too
Charlie Gilley
Will program for food...
|
|
|
|
|
Since you need to use a script language, to obtain values from (as well to pass values to) the ActiveX control you need the control to implement the IDispatch interface (automation, my dear) and to use automation-compatible types as methods parameters. The following link point my article that shows how LicenceProvider COM component implements a method supporting automation
[^].
The relevant code is inside LicProvider::Provide that you may find in the LicProvider.cpp source file.
BTW if it helps, don't forget the beer!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
|
Since you're using MFC, maybe worthy a look at http://msdn2.microsoft.com/en-us/library/95357zak(VS.80).aspx[^]
Bottom line, if it is useful, send the beer to Mummy Microsoft!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
If your "getValue" method has [retval] attribute, you can write:
DIM myInteger<br />
myInteger = myCtrl.getValue<br />
With best wishes,
Vita
|
|
|
|
|
Vita,
Yes, thank you, I know this. But what I want to know is how to do this (example):
DIM nStatus
DIM nWhatever
nStatus = myCtrl.DoSomething(nWhatever)
and .DoSomething returns a value in nWhatever....
chg
Charlie Gilley
Will program for food...
|
|
|
|
|
It's possible for VBScript, for example, but is never possible for JScript.
1) [out] parameter should be VARIANT*.
2) else there should be the Invoke handler be able to convert VARIANT with VT_VARIANT|VT_BYREF to obtain any type. I didn't met such default handlers.
With best wishes,
Vita
|
|
|
|
|
Hello,
I developed a simple browser helper object in VC++ as an ATL project which listens for the DocumentComplete event of the DWebBrowserEvents2 interface.
When testing it I discovered that this event is not fired if the user presses the reload button.
Why is that? And what is the proper event which is fired, when the document is loaded and is fired again, when the document is reloaded?
Thanks for your attention.
Constantin
|
|
|
|
|
|
I found article is using CCmdTarget for finding sink.
I am actually in similar problem,where I am trying to monitor IE with help of
toolbar, so I am using pure atl,com and not mfc.So what is alternative way to monitor events.Or I have to in similar way.
I have IWebBrowser2 object in my hand.
|| ART OF LIVING ||
|
|
|
|
|
I included the technique described in this article and found out that it works under most circumstances but not all:
The event pair DownloadBegin/DownloadComplete which is used to detect the refresh of the page
gets also trigged if the page uses a remote scripting technique. So we would get a false alarm each time the page appends a script node to the DOM.
I played around with another Add-on (the Snap Shot Add-On from www.snap.com) and found out, that it somehow gets DocumentComplete to be triggered if the user presses the pages refresh button.
But how do they do that? And is there maybe a reason that DocumentComplete isn't called when the page reloads?
Best regards
Constantin
|
|
|
|
|
I created a dialog-based MFC applicatioon using wizard and then I added a ActiveX composite control implemented in CMyControl class by adding ATL support to my MFC application. and it added a IDD_MyCOntrol dialog to application.
I want to display this composite control dialog. By default, MFC creates an instance of dialog class and use DoModal on that dialog. I removed that part from InitInstance() and wants to add
something like CComCompositeControl::Create or CreateWindow.. etc which can display that composite control dialog box.
How can I do that as I am not able to get the instance of CMyControl class since simply using new is not allowed as compiler gives an abstarct class error etc
I tried to get the instance of CMyControl class using CComObject but then could not get the pointer to CComCompositeCOntrol class so that I could use create function.
Any idea how to display that composite control dialog box??? it looked easy to me. anny suggestions? links? sample code?
PS: really dont expect any answer to such a badly written question. m just tired
|
|
|
|
|
lol! never mind. i was just tired that night. i was trying to badly mix the MFC and ATL and forgot where one ends and another begins. Composite Control is specifically in ATL and 'Create' should work for it for displaying it. In MFC, I just had to use my activeX control on the default dialog Box provided by MFC dialog based appln. I did not require to use composite control for hadnling that activeX control...i dont know from where i got the idea to use ATL.
anyway, thx all.
|
|
|
|
|
Hey
I have also same kind of the problem and i am not able to add variable for activex control(Shockwaveflash).
Any hint on how to add variable to this control?
Thanks in advance
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
Are you trying to add activeX control inside MFC application? I have not got any error while attaching a variable to shockwave activeX control. I simply added a shock wave flash object inside a MFC application and then using class wizard, attached a variable to it - a CShockwaveFlash object. Are you able to include the CShockwaveFlash class? If yes, then there should not be any problem in instantiating it. Please write the error you are getting in detail.
BTW my problem was different and not related to adding variable to activeX control.
Thanks.
|
|
|
|
|
Thanks for your kind reply.
I am adding ShockwaveFlash activex in ATL Dialog not in MFC dialog, because my applicaion is for Outlook Addin and it is unable to display MFC Dialog(It only Display ATL Dialog).
I am able to add ShockwaveFlash in Desin view but unable to asign variable to it.
Any Idea?
Manish Patel.
B.E. - Information Technology.
|
|
|
|