Click here to Skip to main content
16,008,183 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Directory:: move Pin
Mark Salsbery23-Jul-08 6:10
Mark Salsbery23-Jul-08 6:10 
QuestionExtending Managed, Sealed Classes in C++/CLI Pin
Skippums21-Jul-08 8:28
Skippums21-Jul-08 8:28 
AnswerRe: Extending Managed, Sealed Classes in C++/CLI Pin
Mark Salsbery21-Jul-08 10:20
Mark Salsbery21-Jul-08 10:20 
QuestionRe: Extending Managed, Sealed Classes in C++/CLI Pin
Skippums22-Jul-08 3:32
Skippums22-Jul-08 3:32 
AnswerRe: Extending Managed, Sealed Classes in C++/CLI Pin
Mark Salsbery22-Jul-08 4:29
Mark Salsbery22-Jul-08 4:29 
AnswerRe: Extending Managed, Sealed Classes in C++/CLI Pin
Luc Pattyn22-Jul-08 4:30
sitebuilderLuc Pattyn22-Jul-08 4:30 
QuestionMultiple forms calling same form object Pin
Xaria20-Jul-08 15:44
Xaria20-Jul-08 15:44 
QuestionWindows Service (C++/CLI) and MFC Pin
xuesyuan17-Jul-08 10:51
xuesyuan17-Jul-08 10:51 
I want to write a windows service (myService) by using C++/CLI (Visual Studio 2005). This myService can use MFC function for OLE Automation.

Just for a first try, I did the following project configuration and coding:

• Creating a Windows Service under C++/CRL
• Adding ServiceInstaller with start type automatic and sereviceprocessInstaller with Account Local System
• Setting MFC in a Shared DLL
• Setting Common Language Runtime Support (/clr)
• Setting Multithreaded-Debug-DLL (/MDd)
• Adding #include <afxdisp.h> in stdafx.h

Compile is always successful. But when I use myServie.exe –Install to install my windows service in Visual Studio 2005 Command Prompt, I always get the following exceptions

When debugging:
Unhandled exception at 0x78374588 (mfc80ud.dll) in myService.exe: 0xC0000005: Access Violation reading location 0x00000000.

In Visual Studio 2005 Command Prompt:
Unhandled exception: System.AccessViolationException
Attempted to read or write protected memory.
This is often an indication that other memory is corrupt.
at _wWinMainCRTStartup()

Does anyone know the reason? Where am I wrong?

Many thanks for any help!
AnswerRe: Windows Service (C++/CLI) and MFC Pin
Mark Salsbery17-Jul-08 11:08
Mark Salsbery17-Jul-08 11:08 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
xuesyuan17-Jul-08 12:01
xuesyuan17-Jul-08 12:01 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
Mark Salsbery17-Jul-08 12:07
Mark Salsbery17-Jul-08 12:07 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
xuesyuan17-Jul-08 12:50
xuesyuan17-Jul-08 12:50 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
xuesyuan17-Jul-08 12:20
xuesyuan17-Jul-08 12:20 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
launchck22-Jul-08 18:24
launchck22-Jul-08 18:24 
AnswerRe: Windows Service (C++/CLI) and MFC Pin
led mike17-Jul-08 12:11
led mike17-Jul-08 12:11 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
xuesyuan17-Jul-08 12:44
xuesyuan17-Jul-08 12:44 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
led mike17-Jul-08 18:01
led mike17-Jul-08 18:01 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
xuesyuan17-Jul-08 23:41
xuesyuan17-Jul-08 23:41 
GeneralRe: Windows Service (C++/CLI) and MFC Pin
Mark Salsbery18-Jul-08 5:46
Mark Salsbery18-Jul-08 5:46 
QuestionColumn width change in List View control Pin
Xaria16-Jul-08 21:00
Xaria16-Jul-08 21:00 
AnswerRe: Column width change in List View control Pin
Mark Salsbery17-Jul-08 8:19
Mark Salsbery17-Jul-08 8:19 
QuestionWrite XL File from C++.Net Pin
mohant$.net16-Jul-08 20:17
mohant$.net16-Jul-08 20:17 
AnswerRe: Write XL File from C++.Net [modified] Pin
leonigah23-Jul-08 2:07
leonigah23-Jul-08 2:07 
QuestionHow do you restrict textBox entry? Pin
BuckBrown16-Jul-08 13:43
BuckBrown16-Jul-08 13:43 
AnswerRe: How do you restrict textBox entry? Pin
led mike17-Jul-08 6:23
led mike17-Jul-08 6:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.