|
i m developing a small telephony app usig TAPI. to intitialoze tapi i have to get ITTAPI ptr.
ITTAPI *gpTapi;
HRESULT res = CoInitialize(NULL);
CoCreateInstance(CLSID_TAPI,NULL,CLSCTX_INPROC_SERVER,IID_ITTAPI,(LPVOID *)&gpTapi);
gpTapi->Initialize();
i have added tapi3.h and also give link to Uuid.lib. At compile time it gives no error but at link time it gives error "unresolved symbol _CLSID_TAPI" and same error for "IID_ITTAPI". any one hav idea wats hapening. how can i find CLSID for TAPI and IID for ITTAPI. plz help
|
|
|
|
|
I Too have Face this type of problem many time.
but i get Successful evey time by applying little hack like
you are writing this way
MATRIX- wrote:
CoCreateInstance(CLSID_TAPI,NULL,CLSCTX_INPROC_SERVER,IID_ITTAPI,(LPVOID *)&gpTapi);
and i write this this way.
CoCreateInstance(__uuidof(TAPI),NULL,CLSCTX_INPROC_SERVER,__uuidof(ITTAPI),(LPVOID *)&gpTapi);
but using this hack my above code Run every time,gods Know why??
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
i am willing to build a very simple hex editor program but i dont know where to start so if anybody have any hints, tips or suggestions please let me know. cheers
|
|
|
|
|
CD_ROM wrote:
i am willing to build a very simple hex editor program but i dont know where to start so if anybody have any hints, tips or suggestions please let me know.
i don't know about how to build a HEX Editor but you can found a Example Sourcecode in System Section OF MFC/C++ of CP
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
I am new to COM and I have a silly doubt.
GUID is the combination of network address, the time (in 100 nanosecond increments), and a counter.
Suppose if don't have a network address while creating the Class and I got an ID (Which may not be unique). And after that I connected to the network. What will be the impact of this on the one, which is having the same ID somewhere else?
|
|
|
|
|
Ranjish wrote:
Suppose if don't have a network address while creating the Class and I got an ID (Which may not be unique). And after that I connected to the network. What will be the impact of this on the one, which is having the same ID somewhere else?
suppose if you have read that book carefully it may have stated that when there in no network adapter,the chance of getting Unique Guid are NULL.
The Window Based GuidGen don't display error if it don't find the network card but if you go for dosbased UUIdgen,it willdisplay warning if it don't found the network card.
sorry for behaving rudly to u
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Dear Alok Gupta,
I agree with you, but there is a slight possiblity. I am asking if there is one what will be the impact.
|
|
|
|
|
Hi there!
i am Sorry
the new component when register it will overwrite previous value and application that using the previous value may get stop working.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Alok,
Thanks for your reply.
One more doubt. To make my old component work, will simple compilation work for for me.
|
|
|
|
|
Yeah Brother Ranjish,
i am too New at Com,but i know when ever you build a com dll it perform registration.
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Thank you very much dear Alok.
|
|
|
|
|
you are always welcome Ranjish
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
you are always Welcome,Ranjish
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
In the MSDN docs it is stated that CoCreateGuid uses UuidCreate. The docs for UuidCreate says:
For security reasons, it is often desirable to keep ethernet/token ring
addresses on networks from becoming available outside a company or organization.
In Windows XP/2000, the UuidCreate function generates a UUID that cannot be traced
to the ethernet/token ring address of the computer on which it was
generated. To make something untraceable or unrecognizable, a simple one-way
hash can be used. My bet is that on 2000/XP the ethernet adress is hashed together
with something volatile as the system tick count before it is used in the GUID
creation process. That provides anonymity and untraceability.
For NT4, 95+DCOM, and 98:
In Windows NT 4.0, Windows 95, DCOM release, and
Windows 98, UuidCreate returns RPC_S_UUID_LOCAL_ONLY when the originating computer
does not have an ethernet/token ring (IEEE 802.x) address. In this case, the
generated UUID is a valid identifier, and is guaranteed to be unique among all
UUIDs generated on the computer. However, the possibility exists that another
computer without an ethernet/token ring address generated the identical UUID.
Therefore you should never use this UUID to identify an object that is not
strictly local to your computer. Computers with ethernet/token ring addresses
generate UUIDs that are guaranteed to be globally unique. Windows ME is not mentioned, but I think they fall into the second category.
It seems to me that 2000/XP generates "collision safe" GUIDs without a networking card.
Ranjish wrote:
What will be the impact of this on the one, which is having the same ID somewhere else?
It seems to depend a great deal on what OS you used for generating your GUID. Even if you were generating GUIDs on a Windows 98 machine without a networking card, the risk of you generating a CLSID which is identical to another CLSID not generated on your machine is still pretty small.
BTW: here's the MSDN link: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/uuidcreate.asp[^]
--
Weiter, weiter, ins verderben.
Wir müssen leben bis wir sterben.
Are you bright too?[^]
|
|
|
|
|
HRESULT CoCreateGUID(GUID *pguid) API is used to create GUID's.
According to Don Box in his book "Essential COM" -
"If the current machine doesn't have a network interface, a statistically unique value is synthesized and CoCreateGUID returns a distinguished HRESULT indicating that the value is only statisticallyunique globally but is truly unique when used only on the local host machine."
I hope this helps you understand the problem in a better way!
-------------------------
Have a great day ahead!
Regards,
Sohail Kadiwala
(My COM Blog - http://lovecom.blogspot.com)
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi all,
My goal is to make a tool that is attached to Internet Explorer
and sensing certain events (such as when the user types in something,
the user requests a new URL, the URL address ...)
and providing one's own buttons for certain functions
and processing based on these information.
Though I have been programming in Java and C++ a lot, they were mostly
in Unix/Linux environment.
And to accomplish my goal, I really don't know where to start.
Could anyone tell me where to look for,
which part of windows programming I need to dig into,
what book to read?
If my message is not very relevant to this specific board,
please forgive me for my ignorance.
I would much appreciate your guidance!
|
|
|
|
|
creamcat21 wrote:
My goal is to make a tool that is attached to Internet Explorer
and sensing certain events (such as when the user types in something,
the user requests a new URL, the URL address ...)
for Above Try to search for BHO in MSDN,you can find a sample sourec code for that.
here BHO stands for Browser Helper Object
creamcat21 wrote:
and providing one's own buttons for certain functions
and processing based on these information.
for that there is very good example of IE oolbar in IE programming Section at CP. sorry i don't remeber it name
anyway i think you have to make extra effort to find both
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Is there a way to use a COM+ component from VBScript without registering the component in component services? I have a COM+ component I created using C# (ServicedComponent) that calls out to other .NET assemblies that are not serviced components. If there isn't a way to use the component without registering it, then how can I register just the COM component and allow it to still access the .NET assemblies that is uses?
Any ideas?
Thanks.
-Matt
------------------------------------------
The 3 great virtues of a programmer:
Laziness, Impatience, and Hubris.
--Larry Wall
|
|
|
|
|
|
can someone kindly point me to a small example of a local COM server (exe) and a client who is accessing this local server? that will be extremely helpful!
Thanks!
|
|
|
|
|
|
Thanks Michael,
but that looks like a ATL article, I guess I wanted a COM article??
Thanks again for the quick response!
|
|
|
|
|
liyang yu wrote:
but that looks like a ATL article, I guess I wanted a COM article??
ATL is the best and in my opinion the easiest way to learn COM.
If you want to learn the COM basics the old fashioned way, then I recommend the book "Essential COM" by Don Box. Or do a google for "Don Box" and read some of his on-line stuff.
Michael
CP Blog [^]
|
|
|
|
|
Hi All,
Just a little problem to bother you all.
I am using one component developed in VC. Component creation, events generation etc is just working fine except that sometimes the events generated by the component is not received by the client.
This happens very rarely and the problem persists even after restarting the client app. At this point of time, clients developed in Vb or VC are not able to receive events generated by the component, even though the components are created successfully. The only way out at this point of time is to restart the server app.
I would appreciate if you could help me asap as I am really stuck with this problem.
Regards,
Sudeep
Sudeep Kukreti
|
|
|
|
|
Hello All,
In my .idl I have the following declarations.
typedef struct AXCS_DYNAXRPARA_T_tag
{
sh_dyna_xrpar_t1 data1;
sh_dyna_xrpar_t2 data2[NO_DYNA_PULSES_MAX];
}AXCS_DYNAXRPARA_T;
sh_dyna_xrpar_t1 and sh_dyna_xrpar_t2 are defined in another .idl file.
Now
when I import the generated .tlb into another file I get compilation
errors
since the .tlh file is getting generated the following way.
struct sh_dyna_xrpar_t1_tag
{
struct acs_obj_header_t_tag header;
unsigned short xrparn;
unsigned short index;
short obj_count;
short no_mask_img;
unsigned char version_shdynaxrpar;
unsigned char dummy1;
short no_dyna_pulses;
};
struct AXCS_DYNAXRPARA_T_tag
{
struct sh_dyna_xrpar_t1_tag data1;
struct sh_dyna_xrpar_t2_tag data2[40];
};
struct sh_dyna_xrpar_t2_tag
{
long xrv;
long xrua;
long xrpt;
};
As you can see, sh_dyna_xrpar_t2_tag is getting declared after struct
AXCS_DYNAXRPARA_T_tag declaration. Why so?? The compilation error I am
getting is
error C2079: 'data2' uses undefined struct 'sh_dyna_xrpar_t2_tag'
Why is the compiler getting confused. How can I correct the above.
Using .h and _i.c is working for me. I want to make the above work with
#import .tlb file.
Regards
Rajdeep
|
|
|
|