Can someone explain me the major differences between an ActiveX control and a COM dll in the context of accessing it from a web page using some script. For example, I need to get the MAC ID of the machine from within a web page. So I thought of developing a COM dll, pack it in a cab using cabarc, and call the method from within a script in the OnLoad of the page. Do I need to actually go for creating an ActiveX control instead of developing the COM dll? Is there any problem with using a COM dll? Is there any additional advantage in going for ActiveX instead of COM dll? Infact both the approaches worked fine on my development machine !! Thanks in advance.
csylesh
Posts
-
ActiveX control and COM dll -
C++ DesignI was designing the database part of a module to be developed in C++. Let me explain the scenario. I have to access 4 different databases which are not related in any way. So I created 4 classes that holds the business logic to manipulte each of the databases. Then I thought of creating a database access class for each of the dbs to implement the data access code using ADO, so that the business logic class can call the public functions of these classes to get things done. Then I found that the Connection object is common for all the 4 classes, also there are a few methods that are common, like the OpenDatabase, CloseDatabase, IsOpen, GetProviderError etc etc. So I created a base class for that. Now I have two options, I can either derive the 4 data access classes from the base, or I can contain a member of the base in each one of the 4. Remember, I need all the functionalities implemented in the base class as such in all the 4 classes that implement the business logic. It was found that most people say that we must try to go for weaker coupling if possible, that way I must go for containment. But then I will have to write stub functions to call the base object's function, which is an overhead. I would appreciate it if somebody can give me an advice in this regard. Thanks in advance, Sylesh.
-
Object oriented designI was designing the database part of a module to be developed in C++. Let me explain the scenario. I have to access 4 different databases which are not related in any way. So I created 4 classes that holds the business logic to manipulte each of the databases. Then I thought of creating a database access class for each of the dbs to implement the data access code using ADO, so that the business logic class can call the public functions of these classes to get things done. Then I found that the Connection object is common for all the 4 classes, also there are a few methods that are common, like the OpenDatabase, CloseDatabase, IsOpen, GetProviderError etc etc. So I created a base class for that. Now I have two options, I can either derive the 4 data access classes from the base, or I can contain a member of the base in each one of the 4. Remember, I need all the functionalities implemented in the base class as such in all the 4 classes that implement the business logic. It was found that most people say that we must try to go for weaker coupling if possible, that way I must go for containment. But then I will have to write stub functions to call the base object's function, which is an overhead. I would appreciate it if somebody can give me an advice in this regard. Thanks in advance, Sylesh.
-
Parameterized queryThanks, I just wanted to hear from somebody authoritatively that a parameter substitution is not possible for a table name. Let me raise a new question for curiosity, how does parameter substitution actually prevents injection attack evenif it is a string datatype that is being substituted. Is it some magic with the quotes substitution or the like? Any ideas?? Thanks in advance.
-
Parameterized queryYou are very much correct, and why I specifically asked for a parameterised query is for the same reason, to avoid Injection Attack. So can you explain how I can use a parameter to substitite for table name? I couldn't get it to work !!
-
Parameterized queryCan I use a Parameter ( either in MSAccess / SQL Server ) to set the name of a table which I want to create or get data from . To make it simple, can I execute an SQL this way, (Assuming the DB to be MSAccess) Parameters TableName Text; SELECT * FROM TableName; Or is there a workaround for this?
-
To draw something over a Browser Hosted application WindowI was trying to develop a application to be able to show different documents like .doc, .ppt etc in its view. So I decided to use the Browser Control for the same and I was able to successfully load (navigate) the different documents. My next requirement is to draw some custom text and graphic on top of the loaded document window but I was not able to hook any message to do the same. It seems that once the document is loaded, it is that application which does all the message handling like paint etc. Is there any way out for solving this problem. Thanks in advance for any help on this.
-
LocalizationI have got a desktop app written in VC++ 6.0.(MFC support) Now I have to convert it to an Arabic version. Can somebody help me know what are the steps involed in such a conversion process? I tried to create an Arabic resource using VC resource editor but didn't succeed !! Do I need to have Arabic Windows for that ? Any help on this is highly appreciated. Thanks in advance.