|
artihcv wrote: its dumping all the values in first column instead of splitting it into several column...
how to over come this..
Use the proper delimeter.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I create a ActiveX project in Visual C6 , in this Activex I create a thread with use createthread function , now I want call a event of Activex in inside createevent function, when I call event routine and use my ActiveX in VB or delphi , then I get one exception in run time ,....
Please help me.
Thanks,
Hamed.
|
|
|
|
|
I don't fully understand what you're doing...
You "want to call an event of the ActiveX"... Does this mean you are calling a source interface implemented by the client, but defined in the ActiveX typelib, from the secondary thread in your ActiveX?
...or...
Are you calling your ActiveX dispinterface from the client function called "createevent"?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
Hi Roger Stoltz,
I create a thread in my ActiveX project with use createthread function :
handleTH = CreateThread(
NULL, // Thread Attributes
0, // Stack size
CheckTinyThread, // Thread function
this, // Thread parameter
0, // Default flags
&dwThreadID // Thread ID
);
in inside this function I call a even of ActoiveX :
DWORD WINAPI CheckTThread (LPVOID lpParameter)
{
CMyCtrl *cMyc1 = (CMyCtrl*) lpParameter;
while(TRUE)
{
if ( MT.Detect () == FALSE)
{
cTinyc1->FireTinyDisconnect(); // calling event of activex
ExitThread(0);
}
}
return 1;
}
build my project and use my ActiveX control in VB 6, my control works in IDE of VB correct, but make exe and run exe file ,when code event run get a exception Error.
|
|
|
|
|
Ok, I interpret this as you spawn a thread inside your ActiveX component and try to fire an event from there.
Your ActiveX is presumably running in an STA, Single Threaded Apartment.
An STA can only have one single thread running inside it, if you create another thread you have to set up another apartment. This is done by calling ::CoInitialize[Ex]() in the thread.
To be able to use the source interface you fire the events on you have to marshal that interface to the new apartment. Whenever you cross apartment boundaries with an interface you have to marshal the interface. This can be done with ::CoMarshalInterThreadInterfaceInStream() / ::CoGetInterfaceAndReleaseStream() or through the GIT (Global Interface Table).
Have a look at Lim Bio Liong's article serie startnig here[^] for more info.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
does anyone know which program should I use to partitionate a Hard Disk with Microsoft Windows 2003 Server?????
I have already tried it with the partition magic 8.1 but it gives me an error: "Not possible to execute in Windows 2003 .Net server"
The biggest problem is that we mustn't loose the contents of the disk, so the usual ways are not possible. But with the tools "on the fly" that I have, it is not possible.
Any help, advise or tip will be wellcome.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Well you could rip out its hard drive, then put it into another computer which boots off some other hard drive, then on that use partition magic.
Or you could boot up some linux live on cd program like Knoppix etc... and then use Gparted to modify the partitions.
Or try using the partition magic rescue disks, boot from them and its like running partition magic before windows starts.
//Johannes
|
|
|
|
|
Thanks for answering...
The version of Partition Magic 8.1 that I have is bootable. Windows is not active when I'm in PM8 but it anyways gives me the error. I will try out the option with linux. As the computer is for a Firm I need to have no problems with licences and so on and they are free source, so I shouldn't have problems with it.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
Just be careful, pm8 is probably complaining for a good reason.. google abit about it just incase..
And take backups
//Johannes
|
|
|
|
|
I am trying to access a C# dll from MFC application. One of this dll method, XMLDoc(), returns an XMLDocument object. When I compile the c++ project, a tlh file is created where I find:
virtual HRESULT __stdcall XMLDoc (
/*[out,retval]*/ IUnknown * * pRetVal ) = 0;
Seems this method returns IUnknown instead of XMLDocument object directly. I am facing problem getting the XMLDocument object from this IUnknown interface.
Can anybody show me a way/sample to do this?
Thanks in advance.
Nazmul
|
|
|
|
|
moved to top again..
Anybody?!
|
|
|
|
|
You can use this way
you can make you C# classes accessible to C++ app by registering them as
COM components.
Go to project properties/build and Select the "Register For COM Interop"
option in the Output section.
or if you like command prompt follow these steps:
You can also select the class which will be com visible. use the
ComVisible attribute on the class too.
Please note that for making a class COM visible
-the classes must use a default constructor with no parameters.
-Any type that is to be exposed must be public.
-Any member that is to be exposed must be public.
-Abstract classes will not be able to be consumed.
these steps are from the command line.
Let say your code is in myDLL.cs, then first you need to compile it
csc /t:library myDLL.cs
then you need to use the Type Library Exporter Utility.
tlbexp myDLL.dll /out:myDLL.tlb
Next you need to create a resource script (myDLL.res) with the following
Interface Definition Language (IDL) definition:
IDR_TYPELIB1 typelib "myDLL.tlb"
Then you recompile the application with the new resource file added
csc /t:library myDLL.cs /win32res:myDLL.res
after this is done you can use the class in C# as a COM component in C++
applicaiton
|
|
|
|
|
Hi,
I have inserted several resources in my project : ENU and FRA.
I would like to generate 2 applications:
- one only with the ENU resources
- the second only with the FRA resources
I tried to set the 'project settings > resources Tab' options with diferents parameters with no result.
Please help Me!
PS: I don't want a resource DLL. the project needs only one EXE file by language
XtremDev
|
|
|
|
|
|
If I use AfxSetRessourceHandle the problem is that I need a resource DLL.
so, it implies 2 files by language : 1 exe + 1 dll.
I need just one file by language
|
|
|
|
|
Actually, if you configure all your messages/names/... of every language in a dll... you should only need an *.exe for all languages and one *.dll for every language. Not a pair exe-dll for everyone.
Just wait to see what other people with more knowledge as me say.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|
|
I am not sure but try this. in the rc file of your project, you can find section like
"LANGUAGE 12, 1\r\n"<br />
"#pragma code_page(1252)\r\n"<br />
"#endif //_WIN32\r\n"<br />
"#include ""res\\aaaa.rc2"" // non-Microsoft Visual C++ edited resources\r\n"<br />
"#include ""l.fra\\afxres.rc"" // Standard components\r\n"
put some predefinitions in your project before compiling and switch the language aacording to it. like..
#ifdef LAN_ENGLISH <br />
"LANGUAGE 9, 1\r\n"<br />
"#pragma code_page(1252)\r\n"<br />
"#endif //_WIN32\r\n"<br />
"#include ""res\\aaaa.rc2"" // non-Microsoft Visual C++ edited resources\r\n"<br />
"#include ""\\afxres.rc"" // Standard components\r\n"<br />
#elseif<br />
"LANGUAGE 12, 1\r\n"<br />
"#pragma code_page(1252)\r\n"<br />
"#endif //_WIN32\r\n"<br />
"#include ""res\\aaaa.rc2"" // non-Microsoft Visual C++ edited resources\r\n"<br />
"#include ""l.fra\\afxres.rc"" // Standard components\r\n"<br />
#endif
now if you want english before compiling put #define LAN_ENGLISH in the stdafx.h.
I would like to know whether it worked or not..
nave
|
|
|
|
|
Does the rc2 file always necessarly contain non-Microsoft Visual C++ edited resources?
Also let me know of the following
"#include ""res\\aaaa.rc2"" // non-Microsoft Visual C++ edited resources\r\n"
I think the significance of the quotes is to have the literal meaning. Still I feel there is a typo in the closing quote.
|
|
|
|
|
Hello,
I have code written at VS 2003 which uses VS6/MFC6.
I build it at .NET 1.1 frame work and it run at debug mode very well.
Then I installed .Net 2.0 at my computer and try to run it as well at debug mode.
I got exception as I run at debug, but it is not at my code.
Do you know where can I find links for this problem?
thanks!
|
|
|
|
|
Did you trace youe program setp by step and if yes where you got an exception and whats your program?
|
|
|
|
|
I trying to run exe which includes a lot of code.
What I get is:
"Unhandled exception at 0x7c964ed1 in 12345.exe: 0xC0000142: DLL Initialization Failed."
Then, I countinue to run this exe (at denug state) and get exception on the first C++ object like: CTime or any Code from C++ libraries.
Can you help? Do you know how to progress?
Thanks!
|
|
|
|
|
Do you run CTime of your program or load of a dll ?
|
|
|
|
|
CTime of C++ (load a Dll)...
|
|
|
|
|
When you load this dll whats return value and when you want to load functions whats return value?
|
|
|
|
|
I do not understand your question...
|
|
|
|