|
are you using:
#using "System.IO.FileLoadException.DLL"
or did you add a reference to project?
And you are in the wrong forum. i saw your file is .cs, so it is C# project. This forum is for c++/cli
|
|
|
|
|
There is no such DLL!!
But thanks for trying
(and yes I have referenced all DLL and it works well on XP..)
|
|
|
|
|
Didn't correctly see.
By the way, witch version of VS you are using.
and start debug your code, and look where exception is thrown, especaly look near filestram.
There mus't be a diffrance
|
|
|
|
|
Well it's on a colleague copmputer.
We use VS2005.
But it's not installed under vista!...
Maybe we ought to try to install C# express and debug with it...
|
|
|
|
|
|
Interesting... thanks!
I'm still very much puzzled by the fact it used to work well until last week.
And suddenly started to exhibit this behavior friday... 
|
|
|
|
|
If i have in my class a function. And if i delete all calls to that function, without deliting a function it self, Will that function also compile, or it will be excluded from build
|
|
|
|
|
And if a tree falls in the forest and there's nobody there to hear it, does it make...
Yes.
Try this...
void test()
{
#pragma message( "Compiled on " __TIMESTAMP__ )
}
If it's in a cpp file all by itself and it's never used then it shouldn't get linked.
|
|
|
|
|
Thanks. So i must use precompile directives to exclude it from build
|
|
|
|
|
bsaksida wrote: So i must use precompile directives to exclude it from build
That would work
The compiler has no way of knowing if a function/method is used or not since it compiles on a
per-module (cpp file) basis so I suppose it must assume it's used somewhere else.
Mark
|
|
|
|
|
Hi all,
I am using Kellerman Software which is logging library. actully i have to use this library in console base application using windows 2005(vc++).
in which, whenever i run my application it truncate all the contents of LOG file and shows only current log messages.
what i have to use that it appends the new LOG messages not truncate this file and than add.
if anybody have idea about that please reply me.
thanks
bankey
|
|
|
|
|
I know I don't spend much time in the CP forums talking or maybe even not at all I do allot of browsing here, I recently found a tut from RegistryKey. After adding the code to my project it had said that the namespace did not exist, for example 'Microsoft': class or namespace does not exist. I don't know what to do im completely lost as to where to go from here, I have the most recent as far as i know its recent, SDK 2.0 installed along with VS .NET '03. For this project I am using C++/CLi.
|
|
|
|
|
May be you can post code, that giving error.
|
|
|
|
|
<br />
<br />
#include "stdafx.h"<br />
<br />
using namespace Microsoft::Win32;<br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
<br />
rkey = Registry.CurrentUser;<br />
rkey1 = rkey.OpenSubKey("Software",true);<br />
<br />
RegistryKey rkey2 = rkey1.CreateSubKey("Tweety");<br />
<br />
rkey2.SetValue("Name","Tweety");<br />
rkey2.SetValue("Age",24);<br />
rkey2.Close();<br />
rkey1.Close();<br />
<br />
return 0;<br />
}<br />
Error Log
Im still learning 
|
|
|
|
|
Oh dear ! you are not using managed C++, I fear.
If you want to use this code in unmanaged c++, go to project properties-->configuration properties-->Project defaults-->common language runtime support and set it to commong language runtime support(/clr) .
Or better of starting new project with type VC++-->CLR-->CLR console application .
|
|
|
|
|
it wasn't giving me that option, although I did notice what you were talking about. so im just removed all of my sdk components and reinstalled my sdk. but also i do want to thank you and you helped allot.
|
|
|
|
|
It would be better, if know what project type you have used for creating this console application, If you had selected VC++-->CLR , error you have mentioned should not come at all. If its VC++-->win32 application , you need to select option I mentioned earlier.
Herboren wrote: i do want to thank you and you helped allot.
Its pleasure to help you.
|
|
|
|
|
case USER_NORMAL:
for each (String ^tempStr in arrTableUsers_NORMAL)
{
if (firstColumn == true)
sql += tempStr;
else
sql += ", "+tempStr;
}
return sql;
break;
case USER_POWER:
If i have enabled for each block in a switch statment, i get errors:
Warning 1 The type initializer for '<Module>' threw an exception. 0 0
Warning 2 The variable 'lstListUsers' is either undeclared or was never assigned. 0 0
Error 3 error C2360: initialization of '$S3' is skipped by 'case' label c:\projects\cddvdorganizer\cddvdorganizer\syntaxBuilder.h 379
can somebody please help, this is me a headaches.
|
|
|
|
|
bsaksida wrote: Error 3 error C2360: initialization of '$S3' is skipped by 'case' label
Modify your code like,
case USER_NORMAL:
{
for each (String ^tempStr in arrTableUsers_NORMAL)
{
if (firstColumn == true)
sql += tempStr;
else
sql += ", "+tempStr;
}
return sql;
}
break;
case USER_POWER:
|
|
|
|
|
Thanks, I woud newer thought about this solution, By the way:
Do you know how to fix the foolowing errors.
Warning 1 The type initializer for '<module>' threw an exception. 0 0
Warning 2 The variable 'lstListUsers' is either undeclared or was never assigned. 0 0
|
|
|
|
|
bsaksida wrote: Warning 1 The type initializer for '' threw an exception.
Not sure about this. Might not be due to code shown by you.
bsaksida wrote: Warning 2 The variable 'lstListUsers' is either undeclared or was never assigned. 0 0
Again, this warning doesn't seem to be due to shown code. Where it takes you in the code ? if you click on them.
|
|
|
|
|
It doesn't take me anywhere.
In my solution i added a project(dll) with name ListViewFlickerFree.
declared as lstListUsers.
ListViewFlickerFree ^lstListUsers;
When i had it inside my main project. Sometimes my Design View printed out a an error, instead form. Even if source code didn't change. Sometimes to get it back i had to manualy delete all autogenerated files. Not yust using clean. but also delete .ncb, .suo files
|
|
|
|
|
prasad_som wrote: bsaksida wrote:
Warning 1 The type initializer for '' threw an exception.
Not sure about this. Might not be due to code shown by you.
Fixed that by deliting .ncb and .suo files.
prasad_som wrote: bsaksida wrote:
Warning 2 The variable 'lstListUsers' is either undeclared or was never assigned. 0 0
Again, this warning doesn't seem to be due to shown code. Where it takes you in the code ? if you click on them.
Fixed that:
I had to use batch Build to build the second project(dll) as debug and release
|
|
|
|
|
|
Hi, recently I've found this article: State Pattern in C++ Applications. I've got some questions regarding it.
1. I understand the state can change to another from the state itself. And I saw in the demo there's a forward declaration of GameState in GameStateManager. Is this a good practice?
2. If in each state there's a substate, what should I do? Eg. in Opening there's the AttrackState, CreditState, DemoState, etc.
3. If in each state there's an instance to the same pointer of object (e.g. the GameData pointer of object), what should I do?
Thanks.
"I live for my dream. And my dream is to live my life to the fullest."
|
|
|
|