|
The solution to get the VB6 program to compile is to use:
ref double[], ref double[], ref double[], ref double[]
for the parameters.
Regards,
Mike
|
|
|
|
|
Hi
I am working on DRM (Digital right management) and WMP (Window media player).
I added assembly Interop.WMRMOBJSLib.dll
While the code is executing this line then it throw the error
i.e.
Retrieving the COM class factory for component with CLSID {76FB40C2-7B90-402A-867D-73747BF85F48} failed due to the following error: 80040154.
Here I am mentioned the code.
-----------------------------------------------------------------------
WMRMOBJSLib.IWMRMChallenge objChallenge = new WMRMOBJSLib.WMRMChallengeClass(); //Instantiate challenge Object
objChallenge.Challenge = Request.Params["challenge"];
string varClientInfo = objChallenge.ClientInfo; //to retrive client information
string varHeader = objChallenge.Header; //to retrive the header information of the content
WMRMOBJSLib.IWMRMHeader objHeader = new WMRMOBJSLib.WMRMHeaderClass(); //to instantiate header object
objHeader.Header = varHeader;
string strContentID=objHeader.ContentID; //retrives the contentid of the file played
string indiVersion = objHeader.IndividualizedVersion;
//Report an error if ContentID not found in DRM headers
if(strContentID == null)
{
ReportError("Content not found.");
return;
}
//Get action currently performed
string action = Request.Params["action"];
-----------------------------------------------------------------------
In few article I read Class not registered.
I checked into regedit.
Here I mentioned used .dll
• Interop.LICENSESERVERLib.dll
• Interop.WMRMOBJSLib.dll
• MySql.Data.dll
So kindly suggest me, where is problem.
Its very urget.
Kindly reply me.
Thanks
Asit Sinha
Asit Sinha
|
|
|
|
|
Hi all,
Not sure if this is the right place to post but any help would be greatly appreciated
I've used the code from http://www.codeproject.com/KB/cs/adapterlist.aspx to enumerate adapter bindings. I need to change the network adapter binding order for laptops which have the Wireless connection set as the default (the LAN connection needs to go first). We have over 4000 laptops in our organisation, so setting the adapter order manually would be slightly difficult
In order to change the adapters binding order I need to use the interface InetCG to aquire a writelock.
object objINetCfg = null;
int nRet = 0;
nRet = Ole32Methods.CoCreateInstance(ref INetCfg_Guid.CLSID_CNetCfg, null, Ole32Methods.CLSCTX_INPROC_SERVER, ref INetCfg_Guid.IID_INetCfg, out objINetCfg);
INetCfg netCfg = objINetCfg as INetCfg;
string s;
INetCfgLock netCfgLock = netCfg as INetCfgLock;
int ret = netCfgLock.AcquireWriteLock(5000, "CLIENT", out s);
When trying using the method AcquireWriteLock I get a NullReference exception. I'm using Win XP SP3. Does anyone know what might be going wrong?
Thanks
Paul
|
|
|
|
|
|
Hi,
I am getting base64 text and i want to generate a png image from it. Can anyone please suggest me a good encoder or decode for the same. If anyone knows how to go about with yhis then plz help. The coding for the application is done using VB(using COM) and ASP. So any encoder or decoder making use of VB will be more useful. Plz provide me the details of the links if any.
Regards,
Shiney
Shiney
Shiney
|
|
|
|
|
Decoding base64 has nothing to do with COM.
Read 4 bytes, extract 6 left bits from each of the 4 bytes (24 bits) and create 3 bytes by concatenating the bits.
«_Superman_»
|
|
|
|
|
Hi,
I created an activeX control by using the details from the link
http://www.codeproject.com/KB/vb-interop/VB6InteropToolkit2.aspx?fid=422404&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2441751[^]
I am able to create the activeX control using datagridView and I even added it to VB 6.0 components (Ctrl+T) , but the problem is I am not able to access the properties of the datagrid added instead I am only able to see the basic propertis.And this ActiveX comes with the container kind of thing.
Please help me on it so that i vl be able to access the datagrid properties from VB 6.0 and be able to handle the ActiveX component created in C# as any general third party control.
Guid me if I am following any wrong process.
please reply ASAP.
Thanks in advance
Vani
|
|
|
|
|
How should declare function in COM (vc++) in order to be seen as shared in vb (no instance object needed for function call)?
thx
|
|
|
|
|
As far as I know you can't. COM is all about creating object then calling functions those object provide (via interfaces). You could call a VB Shared method and within that method create a new COM object, call its function then delete it - all within the Shared VB. On the other hand perhaps using a Shared may not be the only way to do what you want.
|
|
|
|
|
Shared vb function than creates an instance of my class, calls function (static one) then delete that object is a good solution, but not a perfect one. Was thinking perhaps there is a keyword that will expose function the way I want
If you can tell me what's the other way arround please let me know
thx
|
|
|
|
|
Sorry, I haven't got another way exactly. What I meant was that when using VB you tend to get used to the things VB lets you do and use - such as using Shared. With COM you have to think more in terms of objects and interfaces and so you tend to design solutions around them.
|
|
|
|
|
Static functions from c++ are equivalent to shared from VB; was thinking there is a way to just expose this static functions; if there isn't will just have to call code in vb common way, using object
thx
|
|
|
|
|
COM exposes interfaces and not methods.
According to your requirement, you want to expose a static method.
That is not COM.
«_Superman_»
|
|
|
|
|
Pop Cristian wrote: no instance object needed for function call
I'm not sure about your requirement, but C++ dll,with exposed methods can be used in VB.
As far as COM is concerned, it talks thorugh interfaces(so you need object) only.
|
|
|
|
|
Hi,
I guess you need to be more clear with your requirements. else you drop in such situation.
you could full fill your requirement by exposing c++ static methods. what makes to do this thru COM.
COM is full if dynamic bindings. and VB shared stuff is full of static things that are decided at compilation.....
^-^
@|@
- redCat
|
|
|
|
|
I have lots of structures/classes in my library, so I need to be COM; there is no specific requirement, all I needed was just a fancy way of exposing / calling a static vc function;
I have now in c code, CMyClass::DoThis(param1, param2), so no need to create new object in c for this; I'll just create a new object in vb, call my function and discard object afterwards
Was thinking in vb I could've have
CMyClass.DoThis(param1, param2) instead of
dim c as new CMyClass
c.DoThis(param1, paramt)
thx
|
|
|
|
|
I have a COM component in server A . I need to compile my code which calls the COM component in Server B . But server B doen not contain COM Installation . Will the compilation works .If so when i am executing it in server A ,will it be able to communicate with the COM .
Is it possible to use a dummy dll instead of the actual COM at the time of compilation and link to the original at the run time . ?
vineesh
|
|
|
|
|
A type library (.tlb), if you have one or can make one can be used to do what you want as a 'dummy dll'.
|
|
|
|
|
hi,
try to learn how to program it as a Automation client and DCOM. you do not need the signature information about the COM server if you go by this way!
^-^
@|@
- redCat
|
|
|
|
|
Hello!
I am trying to write a web application that allow me to search and view outlook 2003 calendars.
so far I have only been able to read my own calendar information via the Microsoft.Office.Interop.Outlook 11 in a console application.
do any one have an idea of how I could search other peoples calendar ? and how to do it in a console application would be fine too
so what I am trying to do is really
1. logon a outlook account
2. read other peoples calendar <-- where I am
3. upload the results to a web application so other can view them and search them
Thanks in advance
modified on Wednesday, January 28, 2009 4:07 AM
|
|
|
|
|
Hi all,
I want to pass a userdefined structure using variant from a COM client to COM server. Can any one help me?...
Regards
Arun
|
|
|
|
|
You need to use idl file. Refer this[^] article by ioannhs_s.
|
|
|
|
|
Thanks for the reply.
I already got this article.But recordinfo failure occurs at that time.
Do u have any example?.
Now i can pass the structure to the COM server without using VARIANT.
|
|
|
|
|
Arun Menon wrote: But recordinfo failure occurs at that time
What kind of error is this?
Arun Menon wrote: Now i can pass the structure to the COM server without using VARIANT.
As said earlier and shown in article, use idl to declare structure as interface. You can use it as function parameter.
|
|
|
|
|
Hi all
I've searched and searched but I can't find a method that will enable me to intercept requests from a WebBrowser control and then provide my own, programmatically generated responses.
Currently, my application uses the control to provide 90% of the UI by loading HTML, CSS and Javascript from disc using the "file" protocol. The scripts then call my app's dispatch interface to make things happen.
What I would like to be able to do is effectively serve these files without coding my own HTTP server. I'm hoping there's a point at which I can intercept the WebBrowser's request and then write my own response back to it. This response will usual consist of the contents of a file extracted from an archive or from the app's resources.
I would also like to be able to spot requests for images (by parsing the URL) so that I can render SVG graphics to a file as a PNG (or similar) and stream that file back to the browser.
So, is there some interface I can implement and supply to the browser in order to achieve the above? As I said, I'd like to avoid writing my own HTTP server or Asynchronous Pluggable Protocol handler.
Thanks in advance
Simon
modified on Friday, January 30, 2009 10:56 AM (typo)
|
|
|
|