|
Sure are lots of questions
well, lets see if we can get answers to them all:
1. CoCreateInstance is a method of CComPtrBase. it is used to create an object of the class associated with a specified Class ID or Program ID.
CreateInstance is a method of the Smart pointer encapsulation _com_ptr_t. it does the same this as CoCreateInstance, but in more convenient way. behind the scenes it calls CoCreateInstance.
CreateObject is a method of CRuntimeClass. you use it to dynamically create the specified class during run time. (a one that supports dynamic creation)
2. *.tlb file is created when you compile the *.idl file of your project. the reason you didn't see it because when you create a COM (ATL) project, you need to create a COM object (i.e simple object) and then you will see the *.idl file. when you compile it, the *.tlb will be automatically generated.
3. Theoretically since COM dll is a dll, it can be approached using LoadLibrary, but to interact with the interfaces will be a tough job. even more, if this is your desire, then why to use the COM dll in the first place. you can simply write a dll and use LoadLibrary to interact with it.
4. If you create a static library, then it will be added to your project (exe) and will be a part of it, you won't be able to see it, you will only have 1 exe that contains it. Creating a dynamic library means the *.exe loads the library during its execution, and it will be apart of the exe (will reside in a *.dll file). think whether you want to work with 1 file (exe) or with several files (1 exe and several dlls)
5. Win32 Static Library and Win32 Dynamic Link Library , read answer #4 it is the same.
MFC dll simply uses the MFC libraries in the project (it can be a staticly used, which means the libraries will be apart of the main exe, or it can be dynamically used which means the exe will load the MFC dll libraries during execution).
ATL/COM dll used the ATL templated in the project. (from MSDN : ATL is shipped as source code which you include in your application. ATL also makes a DLL available (atl71.dll), which contains code that can be shared across components. However, this DLL is not necessary.)
6. Just open Visual studio and choose to create a new project, there you will see all the dll types (such as MFC dll etc)
7. I suggest you refer to the MSDN on the proxy matter, it explains it very well.
8. It is a support for Microsoft Transaction Server. agian, refer to the MSDN on the matter.
9. of course, you just have to choose in the project wizard either you want a Win32 static library or win32 dynamic library.
ce tu
hope it helped you
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
So I want to place some entries in HKEY_CURRENT_USER.SOFTWARE.MICROSOFT.WINDOWS.CURRENTVERSION.MYAPP\
It's configuring a system property so I feel it belongs here.... my fear is those registry cleaners.... how do you make sure they don't wipe out your application data?
Thanks
.
|
|
|
|
|
I'd say it probably does not belong there.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Agreed. If application data is put there it deserves to be cleaned.
Steve
|
|
|
|
|
Well, ok, easy to move...
But the question still remains, how do you make sure those registry cleaners don't wipe out your important application data?
|
|
|
|
|
chasetoys wrote: ...how do you make sure those registry cleaners don't wipe out your important application data?
You can't.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Hi,
Yours app settings you should(\can) store in keys:
- general settings for all users:
HKEY_LOCAL_MACHINE\SOFTWARE\MYAPP
- user settings:
HKEY_CURRENT_USER\SOFTWARE\MYAPP
-----------
Mila
|
|
|
|
|
Hey good input.... couple of followups
1) So if I want to install my application to be accessible for *ALL* users, and specify that changes should be made once per user, and then effect ALL USERS, I'd put it in HKEY_LOCAL_MACHINE, but if I wanted user specific settings, I'd install it in CURRENT_USER, correct?
2) Does each user have their own 'Program Files' directory?
Thanks!
|
|
|
|
|
chasetoys wrote: 1) So if I want to install my application to be accessible for *ALL* users, and specify that changes should be made once per user, and then effect ALL USERS, I'd put it in HKEY_LOCAL_MACHINE, but if I wanted user specific settings, I'd install it in CURRENT_USER, correct
Yes.
chasetoys wrote: 2) Does each user have their own 'Program Files' directory?
No.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Ok, so when one user installs an application is it available to everyone on the WinXP machine? If not, does WinXP set the permsisions somehow to only allow the user who installed it?
If one user downloads & installs app A, then another user logs in and downloads & installs app A, what happens?
|
|
|
|
|
chasetoys wrote: Ok, so when one user installs an application is it available to everyone on the WinXP machine?
Sometimes yes, other times no. It all depends on the application's installation program.
chasetoys wrote:
If one user downloads & installs app A, then another user logs in and downloads & installs app A, what happens?
It all depends on app A's installation and what it does.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Generally, Windows from NT family were designed according to access rights. Every user has got his permissions for perform specific operations e.g. users from Users group don't have permission to (de)/installation.
It's lies in Administrator hands to configure operating system correctly.
-----------
Mila
|
|
|
|
|
Hi,
I've trying to detect code page of given string by DetectInputCodePage function of
IMultiLanguage interface. But this fuction does my application were crashed when jump to this function. Pls tell me while?
This is my code:
CoInitialize(NULL);
CComPtr<imultilanguage2> spMLang;
DetectEncodingInfo lpInfo[1000];
INT pnScores;
wchar_t * wzContent;
if (SUCCEEDED(hr = spMLang.CoCreateInstance(CLSID_CMultiLanguage)))
{
spMLang->DetectInputCodepage(MLDETECTCP_NONE, 0, szContent, &nlen, lpInfo,
npScore); // app crash here
}
Thanks,
CoUninitialize();
|
|
|
|
|
I've never seen this API before but the documentation states that the last three parameters are [in, out] parameters. You treat them as out only parameters.
Steve
|
|
|
|
|
Thanks for your suggestion, I've solved the problem.
|
|
|
|
|
Can you publish the fix? Message board etiquette dictates you should so others can benefit from the thread.
Steve
|
|
|
|
|
Correct it very simply.
CoInitialize(NULL);
CComPtr spMLang;
DetectEncodingInfo lpInfo[1000];
INT pnScores;//Incorrect code inmust be specify as size of lpInfo (INT pnScore=1000)
wchar_t * wzContent;
if (SUCCEEDED(hr = spMLang.CoCreateInstance(CLSID_CMultiLanguage)))
{
spMLang->DetectInputCodepage(MLDETECTCP_NONE, 0, szContent, &nlen, lpInfo,
npScore); // app crash here
}
CoUninitialize();
|
|
|
|
|
hello!
I would like to know if the urls entered in the IE can be captured.
I plan to make something like a firewall "check on the urls specified" and if requested for some specific site that is noted in the program,then it requests for an another site.how do i do this? any specific windows apis?
all ideas are welcome!
|
|
|
|
|
I need to make to socket connection to two differnt places with two different remote address and remote port. the question is if I could use the same local port for those connection.
lets say, local port 1250, and remote port 1251 for first connection and and 10000 for the second.
would it work?
Thanks for help.
|
|
|
|
|
I am new to MFC programming. Iam trying to create a dialog box that has to hold data that would run to 3 to 4 pages. I should be able to access all of them by scrolling(horizontal and vertical) the dialog window. I am trying this in a SDI application using VC++ 6.0 Can anyone help / guide me in this regard?
Thanks
|
|
|
|
|
Hi,
I would suggest you to use FormView instead of dialog. you can add controls to the view like a dialog and since its derived from scroll view, scrolling is added by default.
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
hey there.........thanks for the suggestion.
But as i SAId, i have just started to learn MFC's.
What is Formview? How do I implement this?
Can u help me out?
Thanks.
|
|
|
|
|
Hi,
Check this Form Views[^]
Bye,
Cool Ju
Dream Ur Destiny
|
|
|
|
|
thathvamasi wrote: I am trying this in a SDI application...
Simply derive the view from CFormView . It's one of the last things that AppWizard prompts you with.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
HEY...
thanks for the help.
I tried using CFormView ...
but when I build and run, the main window or the dialog window doesnt show up. I must be missing some line..
i tried debugging but in vain......
any help appreciated.
thanks heaps......
|
|
|
|