Click here to Skip to main content
15,923,789 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
QuestionSuperclassing edit - base functionality? Pin
Christopher Duncan21-Mar-07 9:35
Christopher Duncan21-Mar-07 9:35 
QuestionHow to simplify accessing the objects' attributes inside of ATL DLL? Pin
xelontr20-Mar-07 4:44
xelontr20-Mar-07 4:44 
QuestionOpening Internet Explorer in a new process Pin
rana7419-Mar-07 20:14
rana7419-Mar-07 20:14 
QuestionHow can i add simple object in ATL? Pin
$uresh $hanmugam19-Mar-07 2:37
$uresh $hanmugam19-Mar-07 2:37 
QuestionRe: How can i add simple object in ATL? Pin
prasad_som19-Mar-07 2:47
prasad_som19-Mar-07 2:47 
AnswerRe: How can i add simple object in ATL? Pin
$uresh $hanmugam19-Mar-07 3:24
$uresh $hanmugam19-Mar-07 3:24 
AnswerRe: How can i add simple object in ATL? Pin
prasad_som19-Mar-07 3:32
prasad_som19-Mar-07 3:32 
QuestionError when accessing an object in an object Pin
xelontr14-Mar-07 2:53
xelontr14-Mar-07 2:53 
I am working on ATL DLL project. I added some classes and properties and also some classes have attributes whose type are another class. I mean in class Student there is another class' instance named Course.

When I generate DLL and access it within C# as below, I get an exception in 3rd line.

...
student.Course.Name = "CS 100";
student.Course.Name = "CS 100";
student.Course.Name = "CS 100"; //AccessViolationException
student.Course.Name = "CS 100";
...

There is no difference whether to set the same attribute or not. The code returns "System.AccessViolationException was unhandled. Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

But with the below code there is no problem. It works fine

MyDLLLibs.Course c = new MyDLLLibs.Course();
c = student.Course;
c.Name = "CS 100";
c.Name = "CS 100";
c.Name = "CS 100";
c.Name = "CS 100";

Also I want to create a Collection using std::list to send/receive list of objects to/from DLL. For example Department class has a list named Students which is another class contains Student objects. In Students class there is Add, Remove methods and Item and Count attributes. When adding elements to the Students object as shown in below code, it returns FatalExecutionEngineError at 3rd access to Students "again".

MyDLLLibs.Department d = new MyDLLLibs.Department();
MyDLLLibs.Student s1 = new MyDLLLibs.Student();
s1.Name = "Xelon";
s1.Surname = "XYZT";
...
d.Students.Add(s1);
d.Students.Add(s2);
d.Students.Add(s3); //FatalExecutionEngineError
d.Students.Add(s4);

I can't find what is the problem. Is this an initialization or memory allocation problem?

Thanks for your help
QuestionWeb services and win 32 dll. Pin
LCI13-Mar-07 5:27
LCI13-Mar-07 5:27 
AnswerRe: Web services and win 32 dll. Pin
led mike13-Mar-07 5:42
led mike13-Mar-07 5:42 
Questionqueries regarding working of an application in win2000 but wrong calculation in winxp Pin
Member 385320113-Mar-07 0:34
Member 385320113-Mar-07 0:34 
QuestionPrinting a form larger than the screen [modified] Pin
Enriad12-Mar-07 19:12
Enriad12-Mar-07 19:12 
QuestionLanguage Problem Pin
xelontr11-Mar-07 23:11
xelontr11-Mar-07 23:11 
AnswerRe: Language Problem Pin
prasad_som11-Mar-07 22:15
prasad_som11-Mar-07 22:15 
GeneralRe: Language Problem Pin
xelontr11-Mar-07 23:32
xelontr11-Mar-07 23:32 
AnswerRe: Language Problem Pin
prasad_som11-Mar-07 23:39
prasad_som11-Mar-07 23:39 
GeneralRe: Language Problem Pin
xelontr12-Mar-07 0:06
xelontr12-Mar-07 0:06 
AnswerRe: Language Problem Pin
prasad_som12-Mar-07 0:09
prasad_som12-Mar-07 0:09 
QuestionATL ActiveX destructor not called Pin
TClarke8-Mar-07 4:53
TClarke8-Mar-07 4:53 
AnswerRe: ATL ActiveX destructor not called Pin
prasad_som8-Mar-07 18:10
prasad_som8-Mar-07 18:10 
GeneralRe: ATL ActiveX destructor not called Pin
TClarke8-Mar-07 22:45
TClarke8-Mar-07 22:45 
GeneralRe: ATL ActiveX destructor not called Pin
prasad_som8-Mar-07 22:51
prasad_som8-Mar-07 22:51 
GeneralRe: ATL ActiveX destructor not called Pin
TClarke8-Mar-07 22:57
TClarke8-Mar-07 22:57 
GeneralRe: ATL ActiveX destructor not called Pin
prasad_som8-Mar-07 23:01
prasad_som8-Mar-07 23:01 
GeneralRe: ATL ActiveX destructor not called Pin
TClarke8-Mar-07 23:04
TClarke8-Mar-07 23:04 

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.