|
James T. Johnson wrote:
The SoapClientWebProtocol yadda yadda yadda does all the dirty work
Really complicated bit of code.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi,
I have 2 questions here. Need your help . Thanking in advance.
Question1
Write an application that prints the following diamond shape. You may use output statements that prints a single
asterisks ( * ) , a single space or a single newline character . Maximize your use of repetition (with nested For structures)
and minimize the number of output statements . The desired output should be as below :
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
* * * * * * *
* * * * *
* * *
*
Question2
Modify the program you wrote in Question 1 to read odd number in the range 1 to 19 to specify the number of rows
in the diamond . Your program should then display a diamond of the appropriate size .
regards
|
|
|
|
|
Did your teacher tell you that you can also do it in Managed C++???
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Help! I have this problem. I am linking to an unmanaged DLL using IJW (just including the headers). This DLL is thread-safe and calls must run in a thread.
I have used the System::Threading classes to create a thread. However, the thread class I have must be integrated into an unmanaged class that inherits from a base class in the dll:
e.g.
class A : public QQLListener {} where QQLListener is a class in the unmanaged DLL library. However, the thread must be in class A, but you cannot use System::Threading in an unmanaged class and the class CANNOT be managed because it must inherit from an unmanaged abstract base class.
What is a solution? Is there a non .NET framework Threading library? My application cannot use MFC, it must be console mode. I need a threading system that works in unmanaged code in console mode in a .NET managed C++ project. Any ideas?
Thanks
|
|
|
|
|
You cannot derive managed class from an unmanaged class. You should do something like this
__gc class A
{
QQLListener* pSl;
public:
A()
{
pSl = new QQLListener();
}
void ThreadStart()
{
pSl->threadStart();
}
}
|
|
|
|
|
Thanks for the advice, but unfortunately this will not work either. QQLListener is the base class of a subject-observer design pattern, it must be inherited by a derived class so that the callback methods inside it are called. I suppose there is no way to use my old C++ library with the .net framework. I think it's not quite as "compatible" as they claim.
|
|
|
|
|
Anonymous wrote:
. I think it's not quite as "compatible" as they claim.
The stuff is compatible the exact way of doing things depends on a case to case basis. If you provide little more details then probably I could help.
|
|
|
|
|
Anonymous wrote:
Is there a non .NET framework Threading library? My application cannot use MFC
You can use the API. CreateThread() . Or CRT. _beginthreadex()
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I have an MC++ written control.
I have added it to the C# toolbox.
When I try to insert it into the form [by drag/drop] I get a message box with this *very* informative message :-
Exception from HRESULT: 0x80131019
Blast!!!
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I just wrote a message to you about that. What a coincidence? I did not know that you would land into this problem so soon. Ok this is interseting you can have a look at my article Developing windows forms control with MFC. Basically you have to click on the reference and set copy local to false.
Rama Krishna
Self professed King of Managed C++
|
|
|
|
|
Rama Krishna wrote:
Basically you have to click on the reference and set copy local to false.
Cool! Also had to copy the DLL to the output directory
Rama Krishna wrote:
Rama Krishna
Self professed King of Managed C++
Maybe not kind yet, but you are the crowned prince
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
What's worse is that I caneasily add the control via code. It's just that the form designer refuses to understand the control
Is there any known issue where the C# form designer cannot understand a control made with MC++ ???
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hello,
This is with regard to writing Forms controls using MC++.
Has anyone made any?
If so, what extra steps did they have to take?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
These are the steps I have done right now :-
#using "..\testcontrol\Debug\testcontrol.dll"
....
using namespace testcontrol;
....
Then I have a member in my class as follows :-
Class1 *m_c;
This is all okay.
Now if I do this anywhere :-
m_c = new Class1();
I get this exception when I run it :-
System.IO.FileNotFoundException
Blast!!!!
It found the file alright!!!
Else how would it even compile properly
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Place testcontrol.dll in the output directory of the application which you are building.
|
|
|
|
|
Just did that Rama
Sucks huh?
I thought the #using would tell the blasted compiler to tell the blasted linker to look for it there
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
It's all assembly search policy. I dream to write an article on that. You should be glad that you are not writing the client app in C# in that case there are more interesting issues involoved - C# with MC++.
|
|
|
|
|
Rama Krishna wrote:
You should be glad that you are not writing the client app in C# in that case there are more interesting issues involoved - C# with MC++.
Not so glad anymore...
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Blasted DLL has to be in the same folder as the EXE
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Nish,
I use MC++ for all the projects and C# for Windows forms. Now when I use the C# DLL I need to make sure the DLL is in the compilers path and the exe path. I just change the output folder.
|
|
|
|
|
Albert Pascual wrote:
Now when I use the C# DLL I need to make sure the DLL is in the compilers path and the exe path. I just change the output folder
Yeah, sorta sucks!!!
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
WELL ! I JUST WANNA ASK ABOUT CREATING A SCOKET THROUGH CSocket CLASS
I TIRED THIS CODE (BELOW) BUT IT DIDNT WORKED OUT!
CODE:
CSocket *c = new CSocket();
c->Create(port) ;
it doesnt create a socket .
I EXPECT TO GET THE CODED PROCEDURE OF CREATING A SOCKET! IF ANY ONE CAN HELP ME
|
|
|
|
|
Ok In MC++ you can use TcpClient() TcpListener() and Socket()
Look at this samples by this nice guy called Albert Pascual
http://www.codeproject.com/managedcpp/howtoproxy.asp
and
http://www.codeproject.com/managedcpp/get_the_ip_out_tcpclient.asp
where you can use something like this to listen in a socket :
TcpListener * pTcpListener;
TcpListener = new TcpListener(80);
TcpListener->Start();
TcpClient * pTcpClient;
pTcpClient = m_TcpListener->AcceptTcpClient();
Al
|
|
|
|
|
Thanx for that i'll surely look into it
|
|
|
|
|
I have a C# dll and inside MC++ I tried to use it!
#using "mydell.dll"
I get this error:
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 2844)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
|
|
|
|