|
My managed c++ assembly has a strong name and was signed with proper certificate.
When it's hosted by IE with StrongNamemembershipCondition, it works fine.
If I use PublisherMembershipCondition instead of StrongNamemembershipCondition, it doesn't work and get the below security exception.
Unverifiable assembly '...' failed policy check
How can managed C++ be hosted by IE with PubhliserMemberShipCondition?
|
|
|
|
|
When I run my program (.exe) and something goes wrong that makes the gui disappears (program over), subsequent runs would always die the same way. I do not get an unhandled exception msg. Only after a reboot of the pc does the program work correctly again. It seems like there's a process or something left behind when the program doesn't close properly. Does a program have more than 1 process in the task manager that I may need to kill before running again?
|
|
|
|
|
The GUI may disappear but that doesn't mean the process has ended.
So, yes, there can be processes left "running".
Have you looked in task manager to see if your EXE is there?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: Have you looked in task manager to see if your EXE is there?
Yes it is right there next to the Fish Filet.
|
|
|
|
|
...and yes, I'll take fries with that.
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi...
I'm having stupid problem with pointer to member functions. The following simple test program compiles, but crashes at run-time. Can anybody help me out here?
class cTest{
public:
double rand_mt(void){
return (1000.0);
}
double rand_cpp(void){
return (2000.0);
}
double (*cTest::nrand)(void);
void init(int choice){
if (choice==1){
double (cTest::*nrand)() = &cTest::rand_cpp;
} else {
double (cTest::*nrand)() = &cTest::rand_mt;
}
}
};
void main(){
cTest a;
a.init(1);
cout << a.nrand() << endl;
}
This simple program compiles, but crashes. It works fine if I don't use a class.
Why?
Thanks for your help,
Niko
|
|
|
|
|
myhanguk wrote: , but crashes.
It is because, you are using nrand without initiazing it.
Ask such questions in VC++ forum.
Prasad
MS MVP - VC++
|
|
|
|
|
Try this (modifications marked in red):
double (cTest::* nrand)(void);
void init(int choice){
if (choice==1){
nrand = &cTest::rand_cpp;
} else {
nrand = &cTest::rand_mt;
}
}
You were just assigning function pointers to local variables in init() instead of assigning
to the member variable nrand.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
myhanguk wrote: double rand_mt(void){
blockquote>
i am beginer in c++
but i want to know what (void) refere to?
thanks
******************
** Ahmed Ismail **
******************
|
|
|
|
|
Hello,
I have a strange problem. I want to send some objectes over Ethernet (UDP One packet is one object) After that I Deserialize the data, but I get allways an exception that there is an Invalid binaryheader. I don't have any idea how I can solve it.
my code is
<br />
int size = socket.Receive(buf);<br />
BinaryFormatter serializer;<br />
MemoryStream^ ms = gcnew MemoryStream(buf,0,size);<br />
ms->Seek(0, SeekOrigin::Begin);<br />
LogMessage^ logMessage = (LogMessage^)serializer.Deserialize(ms);<br />
Console::WriteLine("{0}", logMessage->ToString());<br />
ms->Close();<br />
and the sending function:
<br />
MemoryStream^ ms = gcnew MemoryStream();<br />
BinaryFormatter serializer;<br />
<br />
serializer.Serialize(ms, logMessage);<br />
ms->Flush();<br />
ms->Seek(0, SeekOrigin::Begin);<br />
<br />
array<unsigned char>^ data = ms->ToArray();<br />
socket->Send(data);<br />
ms->Close();<br />
I have checked the MemoryStream and there is the whole data available (Sending and receiving)
Best regards
Hansjörg
|
|
|
|
|
Hi all
Please suggest me book for managed c++.
Its better if it doesn't start from basics of c++ like(control constrcts,class,object,inheritance)
It better if it is microsoft publication.
VIBIN
"Fool's run away,where angle's fear to tread"
|
|
|
|
|
The best C++/CLI book is the Manning book by our own Nishant Sivakumar. It's called C++/CLI in Action.
He also answers questions here a lot, so if you read his book, you can get direct access to ask him questions.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I am trying to build up a program in C++ in order to read an xml file and create an output text file (output.txt) which does not retain the xml tags and only the text in between the start and end tags.
For example for the following xml file:
*Abstract*
*AbstractText*The amino acid sequence of APP is highly conserved and age-related Ass aggregates have been described in a variety of vertebrate animals, with the notable exception of mice and rats. Three amino acid substitutions distinguish mouse and human Ass that might contribute to their differing properties in vivo. To examine the amyloidogenic potential of mouse Ass, we studied several lines of transgenic mice overexpressing wild-type mouse amyloid precursor protein (moAPP) either alone or in conjunction with mutant PS1 (PS1dE9). Neither overexpression of moAPP alone nor co-expression with PS1dE9 caused mice to develop Alzheimer-type amyloid pathology by 24 months of age. We further tested whether mouse Ass could accelerate the deposition of human Ass by crossing the moAPP transgenic mice to a bigenic line expressing human APPswe with PS1dE9. The triple transgenic animals (moAPP x APPswe/PS1dE9) produced 20% more Ass but formed amyloid deposits no faster and to no greater extent than APPswe/PS1dE9 siblings. Instead, the additional mouse Ass increased the solubility of accumulated amyloid in detergent and exacerbated amyloid deposition in the vasculature. These findings suggest that although mouse Ass does not influence the rate of amyloid formation, the incorporation of Ass peptides with differing sequences alters the solubility and localization of the resulting aggregates.*/AbstractText*
*/Abstract*
How would i used xerces parser to create an output file with only the text in between the tags?
|
|
|
|
|
I see no evidence that this is a C++/CLI question. If it's not, then standard C++ contains no DOM or SAX implimentations, but both are easy to come by on the web ( and, obviously, a DOM is even easier, if you're using Windows, there's a COM object you can use )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
#include <iostream.h>
#include <conio.h>
#include <string.h>
void fun(const char *& y, const char * &b)
{
for (int i=0; i<15; i++)
{
cout<<*(y+i);
}
cout<
|
|
|
|
|
Nandu_77b wrote: 1) It is accepting both "char* x" variable and "const char* y" - is should not accept "char* x" - but it is accepting, why???????????
The const in fun() arguments means fun() won't modify the passed values. It doesn't mean you have
to pass a const.
Nandu_77b wrote: 2) function "fun()" takes ref of const char*, but the problem is - i am able to change the value of both "y" and "b" - which should not happen since it is const char* - why I am able to change????????
3) What should i do if the fun() should not allow the value of "y" and "b" to change.
try making the reference const, not just the char*...
void fun(const char * const & y, const char * const &b)
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: Nandu_77b wrote:
1) It is accepting both "char* x" variable and "const char* y" - is should not accept "char* x" - but it is accepting, why???????????
The const in fun() arguments means fun() won't modify the passed values. It doesn't mean you have
to pass a const.
/Nandu/: but i am able to change the values. I cant understand why it is.
Nandu_77b wrote:
2) function "fun()" takes ref of const char*, but the problem is - i am able to change the value of both "y" and "b" - which should not happen since it is const char* - why I am able to change????????
3) What should i do if the fun() should not allow the value of "y" and "b" to change.
try making the reference const, not just the char*...
void fun(const char * const & y, const char * const &b)
/Nandu/: I will try this and let you know.
Mark
Thanks
Mark
|
|
|
|
|
Nandu_77b wrote: /Nandu/: but i am able to change the values. I cant understand why it is.
By the way you've declared the passed variables, you've allowed them to be modified.
A "const char * &" is a "reference to a constant character pointer". The character pointer is
constant, the reference is not. The compiler won't complain if you change the reference.
To make a "constant reference to a constant character pointer" you need a second "const":
"const char * const &"
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hello guys, I just want to ask if you know algorithm on how to fill a sector. Currently I implemented floodfill using recursion and by drawing a line from boundary midpoint to sector points but it has some bugs. I hope you can help me.tnx
dfdf
|
|
|
|
|
AFAIK, floodfill exists in GDI and not GDI+, so I'd assume you're not using C++/CLI and if I'm right, you're in the wrong forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
hi all
how can i do something like:
System::Type^ a = int::typeid;
int b = (a^) c;
|
|
|
|
|
What are you wanting to do? I see your pseudo-code but I'm not sure why you think a cast is
necessary.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
I'm trying to learn c++ with the goal able to program 2D games like pacman and stuff like mario bros and final fantasy I. Although C++ is new to me, I have done several other object oriented programming languages, like java. However, I never programmed games before.
I read an article about game programming, saying that I need a game engine, it recommended SDL (http://www.libsdl.org/).
When I looked up for some demo's of SDL, I didn't like the program going full screen all the time. Does anyone know if it's possible to make stuff run in a windowed mode with this engine? Also, is this a good game engine to start with and will I need more advanced engine later on?
|
|
|
|
|
I am new to window programming and I need to do a task which is to know whether all the child dialogs have been exited before closing the main dialog. Can you please direct me, how can i do it?
Further explanation is the main dialog should not exit of ESC key unless all the child dialogs are properly closed.
Thanks in advance.
S.S
-- modified at 8:58 Tuesday 12th June, 2007
|
|
|
|
|
Iterate through them and check their Visible property.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|