|
In order to login SSL website ,the client must be choose the certificate in the local machine .I want to know whether certificate can be chose by BHO (Bowser helper object).
I know BHO can make IE GoBack ,GoForward and navigate and so on. And if so , how to make it ?
Thank you very much!
Lampa
|
|
|
|
|
i need anyone who can teach me how to write codes to solve the problem of time-tabling schedule using simulated annealing technique. i will appreciate it if the program can be written with MATLAB language.
awoyale
|
|
|
|
|
Hi,
Quite new to COM, I need to reuse VB runtime into ASP.NET C#
I was able to give reference to the same and now am able to create objects of type PropertyBagClass in my code behind.
Question : Whenever PropertBagClass.ReadProperty() method returns a null value, it give an object of type System.__ComObject. I can see it in Quick Watch window. I need to check whether the returned object is null. How can it be done ? There is a default value in case the property does not exists in PropertyBagClass, but it does not return the default value.
Please let me know some pointers about solving this issue.
Thanks !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Hi,
I would like to get control on menus of Office 2007 but I am not able to find out what type of interface is used to control this. Is there any way to get the control on these.
THanks
SNI
|
|
|
|
|
1.Word eg: you can rewrite the sub of "save" in VBA template file:
Sub FileSave()
'ActiveDocument.Save
End Sub
2.word eg: set enble property:
activedocument.CommandBars("File").Controls(5).Enabled = False 'office2003
|
|
|
|
|
Hi all,
I'm embarking on a fairly complex project (I know. Please don't say simply "Google for it". I already did).
What I want is to implement an OLE DB layer between a physical DB (connection via standard OLE DB interface) and a client application.
The aim is to implement row level security and additional functions (such as logging) in the OLE DB layer.
So the architecture should be like this (top-down):
Client Application <- Ole DB consumer application (MFC, .NET, Excel...)<br />
-----------------------<br />
OLE DB Provider <- On the client. Dumb connection to my service via the Network layer<br />
-----------------------<br />
<br />
Network layer <- I really don't know how to pass through this<br />
<br />
-----------------------<br />
OLE DB Consumer/Provider service <- This should be on a network server. Here I'm implementing row level security. This service acts as an OLE DB consumer for the DB and exposes data to the client.<br />
-----------------------<br />
Physical DB <- Any OLE DB-compliant database (mainly SQL Server or Oracle)<br />
-----------------------
My question is: what is the best way to implement the Network layer?
I found an OLE DB Remoting Provider by Microsoft, but seems outdated and not supported ATM. If using this, I should implement OLE DB Provider interfaces into the Service on the server.
Any suggestions?
(Cross-posted in the C++/MFC Forum. Don't know which forum is best suited)
modified on Wednesday, February 4, 2009 12:33 PM
|
|
|
|
|
Hi, Here's an idea: Asynchronous WinHTTP[^],...but, it's probably NOT what you're looking for.
I think you'll see what I'm getting at, it's difficult for anyone to guess at the implementation specifics of your project. You should provide us with a little more information. Versions of the server operating system, COM?, DCOM?, NET?, level of security,...stuff like that.
It's a typical type of component development,...I would begin by reviewing the various security implementations that already exist for your preferred mode of transport, and go from there.
Maybe, something like this: DCOM Technical Overview[^], would be a good place to start. Or, maybe, you could peruse. Codeproject Database Articles[^]. Codeproject has an amazing amount of information available, you have to scan it, though.
|
|
|
|
|
Thank you much for your suggestions!
I was not much specific about implementation detail just because they are quite fuzzy, ATM.
I'm sketching the system architecture designing boxes to be filled with selected components.
So the question is "what is the best technology for implementing this component"? I can't start working if I don't have a picture of the desired result.
I.E.
For the data provider on the client side, for maximum compatibility, the choice is still VC++, COM and OLE DB (either with ATL or not). This manages the communication with the client-side only, so I needed some hint on what's the best technology (for scalability, flexibility, ease of use, performance, ...) to implement the network communication layer.
DCOM, for instance, is harder to implement and does not get easily through firewalls (for what I read, I didn't use it really).
I read about .NET remoting: it's easy to use and performs quite good, but it's managed and seems difficult to integrate with native OLE DB code.
Asynchronous WinHTTP seems really promising: thanks for pointing that out!
If you have any other suggestion, it's really appreciated.
|
|
|
|
|
I had to read up on OLE DB, as I'm unfamilar with its object hierarchy. And, I really don't know what to suggest, except that you do some serious research on the underlying RPC transport that COM uses when accessing remote objects, for instance: (The RPC Model Overview, MSDN[^]). This occurs in a largely transparent way (from a programmer's point of view). So, you don't really create a network layer, specifically. Typically, with standard marshaling, MIDL is used to generate COM interface definitions for your DB provider and comsumer components, and the Proxy/Stub architecture that COM relies on for instantiating remote objects. The security model is implemented at the network machine level boundary (think, AccessCheck) through authentication and Operating System mechanisms of access control which can be configured either programatically or administratively. If you can get a copy of Don Box's 'Essential COM' or, 'Inside COM+ Base Services', by Guy Eddon, I would suggest that you familarize your self with the security aspects of COM. There are a number of technical articles at MSDN, for instance:
COM, Component Object Technologies, MSDN[^], and, COM Security in Practice, MSDN[^], or, DCOM Architecture, MSDN[^].
The .NET Framework is largely designed to make internet access easy, but, this depends largely on which version of the runtime you use. Interop between COM and the .NET Framework is also a possibility, but, many programmers initially find this approach cumbersome and error prone. Also, the NET redistributables and whatever dependent libraries are necessary, must be installed on both server and client.
I think your answer, is to do more research,...but, start with COM, since the OLE DB component is COM (this will initially simplify alot of development).
|
|
|
|
|
I've just encountered a bit of an issue while trying to do some sort of automatic recovery from a MySQL server crash to a C++ app.
Basicly, once I catch a DB_E_ABORTLIMITREACHED somewhere in the app I set an event to perform a ->Close() and ->Open() (in a separate thread) and check if that worked OK. I keep doing this for each throw with the above error.
Problem comes up when the Open() is theoretically ok again, all other apps that rely on that server are properly working with it again but any attempt at calling ->Execute() keeps throwing the same thing.
Has anyone encountered this behaviour before and could shed some light on why and maybe how to fix?
PS: After about 5 minutes of throwing that exception (after I restart MySQL that is) stuff miraculously starts working again, no more exceptions.
PS2: Also tried clearing Errors, there aren't any there it seems.
Here's a bit of code that might make things more clear:
_ConnectionPtr pConn;
try
{
pConn->Execute(...);
}
catch (_com_error &e)
{
switch (e.Error())
{
case DB_E_ABORTLIMITREACHED:
SetEvent(hReconnectDBEvent);
break;
}
...
}
while (keepChecking)
{
waitRes = WaitForMultipleObjects(..., 30000);
switch (waitRes)
{
case WAIT_OBJECT_the_reconnect_event:
if (pConn->State == adStateOpen)
{
pConn->Close();
}
pConn->Open(...);
break;
}
}
Once connection is reopened ok attempts to Execute something still throw that exception for about 5 more minutes. After that everything returns back to normal.
Last modified: 1hr 5mins after originally posted -- clarification, code
|
|
|
|
|
Is there any reason you suspect that this might be COM related and not MySQL related? As per the great MSDN, DB_E_ABORTLIMITREACHED means this - "Execution aborted because a resource limit has been reached; no results have been returned.". I am just guessing, but maybe you're hitting maximum concurrent connection limits (the fact that a restart of MySQL fixes the issue also supports this theory)? Are you using smart pointers for your ADO connection objects?
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
That isn't thrown randomly and MySQL restart doesn't fix it. If I stop MySQL (or for some weird reason the application is cut off from the SQL server) then this is thrown, with a message of "Connection to MySQL died" or something like that.
After that I start MySQL back up my thought was that a reopening should allow me to work again but even if Open() works just fine (I manually force the exception after SQL is back up which leads to Open()), attempting Execute() throws the same exception as before, for about 5 minutes after which it magically works.
And there is the possibility that MySQL might be the one doing this due to some weird timeout. And I only have 1 connection to MySQL which is supposed to be open all the time (communication is supposed to work even over a 9600bps line, opening connections every query can add quite a bit of ovehead when the same line is also used for App -> App Server comm).
|
|
|
|
|
Sounds like the OLE DB driver is doing some kind of connection optimization by physically attempting an "open" only when a query is executed - a "lazy connect" if you will. One area you might want to look into is connection pooling. See if turning off connection pooling produces different results. MSDN has more[^] on this.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
Hi developers,
How to transfer serial port settings in one form design to another form.I used that serialport method error occured access denied COM1 and how solve this problem
|
|
|
|
|
Are we talking about COM as in COM1, COM2 etc or COM as in Component Object Model, or both?
|
|
|
|
|
Hi,
I would like to add some text in the cation of document. e.g. If I have a Test.doc then the caption for this document is Test.doc but I want to add some more text to it like "Mydoc" so the caption will become "Test.doc Mydoc". I know we need to change some registery entries but I want to change it for all office documents. Actually I m changing the extension of these documents as Test.gdoc so for all office docs with extension it should attach this caption.
Pls let me know that how could we achieve this.
Thanks
SNI
SNI
|
|
|
|
|
What if you handle the "Open" event for the Document object in "Normal.dot" and write code that looks like this?
Private Sub Document_Open()
If IsFileGDOC(ActiveDocument.name) Then
ActiveDocument.Windows(1).Caption = ActiveDocument.Windows(1).Caption & " - Ding"
End If
End Sub
Private Function IsFileGDOC(name As String) As Boolean
IsFileGDOC = False
If InStr(1, name, ".gdoc", vbTextCompare) Then
IsFileGDOC = True
End If
End Function To edit "Normal.dot" just open the VBA editor in Word and edit the code for the "ThisDocument" object in "Project Explorer" under the "Normal" document.
--
gleat
http://blogorama.nerdworks.in[ ^]
-- Number Two's eyes narrowed and became what are known in the Shouting and Killing People trade as cold slits, the idea presumably being to give your opponent the impression that you have lost your glasses or are having difficulty keeping awake. Why this is frightening is an, as yet, unresolved problem. -- HHGTG
|
|
|
|
|
I am using the VC 6.0 ocx in VB6.0
In this ocx I am firing the event in thread with long value as parameter.
There is only single thread.
I am getting the correct value in client(vb) application.
It's working fine when I am running it.
But when I tried to debug in VB application in event after pressing F8
application suddenly exits. But without threading it's I can debug also.
I could not get the problem. When I used try catch around fire event it gives exception as memory could not read.
Help me for this....
Thanks in advance.
|
|
|
|
|
chetanjoshi9 wrote: In this ocx I am firing the event in thread with long value as parameter.
There is only single thread.
....
But without threading it's I can debug also.
What does this mean? Are you creating secondary threads inside your ActiveX or not?
If you are firing events from a secondary thread, you have to initialize the new apartment with a call to ::CoInitialize() and marshal the event sink interface to the client from the apartment that created your server to the apartment with your secondary thread.
Another solution is to post a message to the thread that created your server and fire the event from there.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hello,
I have created a C# DLL with two functions:
One function has two parameters: double, double
The other function has four paramters: double[], double[], double[], double[]
Using VB6, I can successfully call the first function. However, upon trying to call the second function, I get a compile-time error:
Function or interface marked as restricted, or the function uses an Automation type not supported in Visual Basic.
I need to pass arrays of doubles. How can I get the program to work? Any help is appreciated.
Regards,
Mike
|
|
|
|
|
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
|
|
|
|
|