473,804 Members | 3,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating CWinApp instance from IIS?

3 New Member
Hi,

I'm currently working on integrating our company's management system into .NET. The system was originally created in Visual C++ 6.0, but new requirements point to that we may need to make use of .NET Web Services. I've already succeeded in getting all our system code to compile into a new C++ web service.

The problem is that I need to "start" a the system from within the Web Service (I'm currently implementing this code in the Application_Sta rt method of Global - it's fine if mutiple instances of the system exist). The system code needs a pointer to a valid CWinApp instance in order to spawn some threads and attach to other network services on startup.

I've been looking around the web for a solution to this problem -- is there a way to create a new CWinApp object and attach it to the underlying IIS process? Is this even possible? Does C++ .NET offer some function by which you can access the underlying process?

I guess another (probably easier) option would be to launch a new CWinApp instance from within the Web Service with its own memory footprint -- I'm just not sure how to do that.

Any advice would be greatly appreciated,

Riaan
Nov 29 '06 #1
1 1938
RiaanDP
3 New Member
nevermind, it's working now!
Nov 30 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
3369
by: bagnjm | last post by:
Hi, I have a huge VC6 MFC project that was converted to Visual Studio 2005 beta2. After the conversion, the application crashes because AfxGetThread() returns NULL and thus fail on pThread->InitInstance() inside AfxWinMain(). I have a CWinApp derived class (e.g. CBaseWinApp) exported from a DLL. This derived class is inherited inside the main app (e.g. CDerivedWinApp : public CBaseApp) and serves as the global app.
5
5306
by: Dan Trowbridge | last post by:
Hi All, I'm in the middle of porting code to VS.NET from VS6.0. My code compiles fine under DEBUG mode but under RELEASE mode I get a compile-time error: C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin2.inl(1034) : error C2039: 'Enable3dControls' : is not a member of 'CWinApp' C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(4289) : see declaration of 'CWinApp'
15
6753
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use javascript or vbscript it works. I will appreciate any help. I do the following (C#):
0
1059
by: shiva | last post by:
I have developed a MDI application. In that I am had aproblem tried in another Application also same problem If i override the Application class's destruvtor it is giving this exception when i close my application it is throwing an exception. The exception is like as follows The Instruction at "0x002f25c9" referenced memory at "0x08000000". The memory could not be "written" The instuction at "0x77f87c53" referenced memory at...
0
2069
by: Milind Phadnis | last post by:
Hi, I have an application which was developed with Visual C++ 6.0 and MFC. In the application, the CWinApp::WinHelp method was overridden to support context sensitive help (F1 help). The application was recently upgraded to Visual Studio .Net 2003. The help links no longer work. The WinHelp method in my derived application class no longer gets called, when the user presses F1 in the application as before. The application instead looks...
3
12633
by: bonk | last post by:
I have created an MFC project that links MFC MFC as shared dll and uses /MD . This MFC application loads another dll B via Loadlibrary that has /MD too and also links MFC as shared dll. Dll B again loads dll C that also uses MFC as a shared DLL dll and also has /MD. Also the MFC app statically links to a .lib that has MFC linked as shared dll and has /MD Now for some odd reason when the constructor of my MFC app is called...
1
2209
by: shakthi | last post by:
hi, am very much new to C++ windows programming.i took the foll code from net and just ran on MSVS2005.I get no compliation error.But when i buid it, it shows the foll errors: 1>------ Build started: Project: testcon, Configuration: Debug Win32 ------ 1>Linking... 1>libcmtd.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup 1>C:\SAMPLES\testcon\Debug\testcon.exe : fatal error...
19
1956
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
I'm doing my c# more and more like i used to code c++, meaning i'm casting more often than creating an instance of objects. like : protected void gvOrderDetailsRowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { switch (((Sale)e.Row.DataItem).SzPN) {
3
1473
by: Peter Morris | last post by:
Hi all Let's say I am creating a model to represent classes and properties. In addition to this I need instances of classes and values for those properties. KEY: (AssociationEndName)
0
9705
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10311
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9138
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5516
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3813
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.