|
hi all,
how to acess messages from MSMQ Events when message arrived from source to Destination in OnArrived() function.
thanks,
uday.
uday kiran
-- modified at 7:33 Wednesday 12th April, 2006
|
|
|
|
|
TMetafile *pMetafile = new TMetafile;<br />
TMetafileCanvas *pCanvas = new TMetafileCanvas(pMetafile, 0);<br />
pCanvas->Brush->Color = clRed;<br />
pCanvas->Ellipse(0,0,100,100);<br />
<br />
FILE *fpW;<br />
fpW=fopen("h","wb") ;<br />
fwrite(pMetafile,sizeof(*pMetafile),1,fpW);<br />
fclose(fpW);<br />
delete pCanvas;<br />
<big>delete pMetafile;
<br />
TMetafile *pMetafile1 = new TMetafile;<br />
fpW=fopen("h","rb");<br />
fread(pMetafile1,sizeof(*pMetafile1),1,fpW);<br />
fclose(fpW) ;<br />
Form1->Canvas->Draw(0,0,pMetafile1);
If the pMetafile is deleted after saving the data into file then the code will not draw Ellipse. Is it there any way to store and retrive the Metafile Info.
|
|
|
|
|
Try sizeof(TMetafile),looks like you did not save the metafile.
Best Regards,
Deepu
|
|
|
|
|
Dear friends,
is there any one help me to develop an IVR(Interactive Voice Response) system using TAPI and any language(i prefer VisualC).
Thanks alot
-- modified at 7:18 Tuesday 11th April, 2006
|
|
|
|
|
|
asdf1753 wrote: is there any one help me to develop an IVR(Interactive Voice Response) system using TAPI and any language(i prefer VisualC).
Start reading article on tapi, here would be good start http://www.codeproject.com/vbscript/tapi.asp
|
|
|
|
|
i have read all of these articles but none of them not about IVR, and they are about data communication and playback wave and record wave only.
|
|
|
|
|
|
|
I've created a dll in C++ which I would like to import in a C# project.
I managed to import the dll and create an object of 1 of the classes, but none of the functions are exposed into the .NET project.
What have I done wrong? All the functions are public.
Code looks like this:
<br />
namespace MyNS {<br />
public class MyClass : public COleDispatchDriver{<br />
public:<br />
MyClass() {}
MyClass(LPDISPATCH pDispatch) : COleDispatchDriver(pDispatch) {}<br />
MyClass(const Iicall& dispatchSrc) : COleDispatchDriver(dispatchSrc) {}<br />
<br />
public:<br />
<br />
public:<br />
};<br />
}<br />
There is also a thread in the C# forum, I know, I'm looking for this for some time and I just can't find the solution
tnx in advance.
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
C# is like Managed C++...
moreover, i think there might be a problem with the namespace.
|
|
|
|
|
v2.0 wrote: C# is like Managed C++...
yes, kinda, but I don't understand what that's got to do with it.
v2.0 wrote: there might be a problem with the namespace
What do you mean? Anyway, I managed the same without the namespace (but still no exposed functions).
tnx for the answer.
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
V. wrote: yes, kinda, but I don't understand what that's got to do with it.
i dont know MC++, but isn't there any __gc stuff to place somewhere ?
|
|
|
|
|
I've looked into it, but it doesn't work. tnx though, it looked like a good idea...
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
Can you be more clear ?
where you have created object of class from dll ?
|
|
|
|
|
I made a dll in C++, I imported it in a C# project (add reference)
I can create the object (MyClass myclass = new MyClass();) but the C# project doesn't seem to know the functions of the class.
tnx.
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
Let me repeat the things, what you would have done, correct me if i'm wrong
V. wrote: I made a dll in C++, I imported it in a C# project (add reference)
It must be a COM component having IMyClass interface, having some function .
You have added its .tlb in your C# project and used CMyClass class.
If you have followed above steps, then it should not be problem.
Whats error program giving after build ?
|
|
|
|
|
There is no error.
What I have done is loaded the tlb in a C++ project (it didn't load in a C# project).
The C++ project made some classes as a wrapper for the functions exposed by the tlb file.
I compiled the C++ as a dll and imported that dll in my C# project.
So the dll is just a wrapper for the tlb file. Nothing more.
The result is that I can create an object of the class, but none of the functions are visible in intellisense. When I type it manually, the compiler says the function doesn't exist.
My apologies if it wasn't clear.
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
V. wrote: What I have done is loaded the tlb in a C++ project (it didn't load in a C# project).
why? it should get loaded. whats error its giving.
V. wrote: I compiled the C++ as a dll and imported that dll in my C# project.
How you have imported this dll ? I think in C# gor using functions from dlls, one need to follow VB way.
|
|
|
|
|
prasad_som wrote: whats error its giving
---------------------------
Microsoft Visual Studio
---------------------------
A reference to 'C:\<path>\filename.tlb' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
---------------------------
OK
---------------------------
prasad_som wrote: How you have imported this dll ?
Same as always: add reference, browse, select the file...
I also did it the VB way (CreateObject, Invoke ...) some functions worked, but not all of them (especially those I needed)
[EDIT]When using the VB way I already tried round about everything, I don't think it will work that way...[/EDIT]
Coulda, woulda, shoulda doesn't matter if you don't.
-- modified at 5:55 Wednesday 12th April, 2006
|
|
|
|
|
V. wrote: ---------------------------
Microsoft Visual Studio
---------------------------
A reference to 'C:\<path>\filename.tlb' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.
---------------------------
OK
---------------------------
I'm confused a bit. Actually this error I'm getting while adding dll to my project. .tlb I can add without any problem.
Lost really.
|
|
|
|
|
Well, At least I'm not the only one who's confused here .
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
V. wrote: ...but none of the functions are exposed into the .NET project.
Do you mean exported?
"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
|
|
|
|
|
Well, the problem is that I can create the object (with new). But I can't use the functions.
suppose I have a public function called GiveLastError
I would do this in my application:
MyClass myclass = new MyClass();
string error = myclass.GiveLastError();
tnx
Coulda, woulda, shoulda doesn't matter if you don't.
|
|
|
|
|
Did you try by exporting the functions directly in the dll?
|
|
|
|