|
These are my settings in Project, Properties, C++, Command Line.
/Od /AI ".\..\Bin" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FD /EHsc /RTCs /MDd /GS /Yu"stdafx.h" /Fp".\Debug/AdoManRs.pch" /Fo".\Debug/" /Fd".\Debug/" /W3 /nologo /c /Zi /clr /TP
But I keep gettting the error that /RTC1 and /clr are incompatible.
cl : Command line error D2016 : '/RTC1' and '/clr' command-line options are incompatible
I don't see that those two options are being used. I've tried every combination of compiler options but I just get the same error.
|
|
|
|
|
/clr is activate via the "use managed extensions" option in the general page.
/RTCx is enabled via C++/Code Generation/Basic Runtime checks.
Looking up the Compiler error code will should give a better explaination too. (in this case it doesnt )
top secret xacc-ide 0.0.1
|
|
|
|
|
Thanks that worked!
|
|
|
|
|
Salutations mateys....
I was wondering about the new features in .net framework 2 beta.. Can anyone tell me or give me a list of the new features?
Thank you in advance
Morten Kristensen aka. Sir Erugor
|
|
|
|
|
|
In W2K and XP, when you resume after a suspend or hibernate the OS asks you to provide a user id and password. While this is happening, the suspended programs continue to run in the background.
Does anyone know how to detect this is happening from within the program? I'd like to suspend processing in my program until the user has logged on.
Andy
|
|
|
|
|
|
Thanks for the suggestion, but that is specific to services. For ordinary programs running on the desktop it always returns 'True'. I ran a test just to be sure.
Thanks anyway,
Andy
|
|
|
|
|
Andy Henderson wrote:
is specific to services.
Oops didnt know that Will add to my knowledge base! Another suggestion, you can perhaps look if a handle has been created, that failing query the size of the form, if size.empty normally the program is in a minimized state, but u could check for that, it mite be diffenrent in your case.
top secret xacc-ide 0.0.1
|
|
|
|
|
Thanks again for the suggestion, but no good either. The program runs in what it thinks is a normal environment - it even has a current user even though a log in screen is being displayed!
I guess there might be some kind of system message, but I don't know where to get a list of them from.
Andy
|
|
|
|
|
After a lot of research I managed to answer my own question. During the log in process the OS displays a different desktop - and that can be detected in a VB.net program as follows...
Declare Function GetThreadDesktop Lib "User32" (ByVal dwThread As Integer) As Integer
Declare Function OpenInputDesktop Lib "User32" (ByVal dwFlags As Integer, ByVal fInherit As Boolean, ByVal dwDesiredAccess As Integer) As Integer
Declare Function GetUserObjectInformation Lib "User32" Alias "GetUserObjectInformationA" (ByVal hObj As Integer, ByVal nIndex As Integer, ByRef pvInfo As Byte, ByVal nLength As Integer, ByRef lpnLengthNeeded As Integer) As Integer
...
Dim MyDesktopName(254) As Byte
Dim MyDesktopNameLength As Integer = 0
Dim InputDesktopName(254) As Byte
Dim InputDesktopNameLength As Integer = 0
Dim StringLength As Integer = 255
Dim UOI_Name As Integer = 2
Dim x As Integer
Dim z As Integer
...
'Get name of the program's desktop
x = GetThreadDesktop(AppDomain.GetCurrentThreadId)
z = GetUserObjectInformation(x, UOI_Name, MyDesktopName(0), StringLength, MyDesktopNameLength)
'Get name of the active desktop
x = OpenInputDesktop(0, False, 0)
z = GetUserObjectInformation(x, UOI_Name, InputDesktopName(0), StringLength, InputDesktopNameLength)
For i = 0 To 254
If InputDesktopName(i) <> MyDesktopName(i) Then
'Here if the program is not running on the active desktop
'Eg. if login screen is showing after hibernate or suspend,
'or a password-protected screen saver.
End If
If InputDesktopName(i) = 0 Then Exit For
Next
Andy
|
|
|
|
|
Hi Everyone,
I am trying to figure out how to create an application that uses a database. However, I would like my application to be setup in such a way that it can use the data from another person that is using the same software.
Example: (I am a bird watcher) I have an application that tracks all the birds I see as well as the pictures I have of them. All the data is contained in a MS-Access database and is on my local system.
What I would like to do is to be able to modify the "data getting functions" in such a way as to be able to get the data from another person's computer who is running the same application. Also, That other person would be able to read information from my database.
All the examples I see in remoting are related to having a client and host that are 2 different computers. There is no example of being able to remote on to yourself. The fact that your class has to be registered as client or host exclusively suggests that it cannot be done.
Anyone have any clues ?
Thanks
Gary
Just for the fun of it !
|
|
|
|
|
Remoting is used all the time under the covers on the same PC. Examples are scarce though Have a look at appdomains perhaps for a starting point.
top secret xacc-ide 0.0.1
|
|
|
|
|
No, if it is like that there is no question of remoting is extension of DCOM. u can write client and server applications in the same PC or in different PC's.
|
|
|
|
|
Hi
See we can do remoting on the local system itself, Remoting nothing but transmission of information from one application domain to another application domain . So for that u definately need a hosting application that host u r remoting object and one or more client applications that will make use of u r remote object.
i am not able to understand what is u r requirement, can u make it more clear?
it might be like this
u have to decide which one is u remote object and u r saying that accessing of the data from other persons database so u have to make other person system as u remote object that will make to way communication.
|
|
|
|
|
Hi,
what I want to do is an application that uses a database.
The application would not be a client/server based in the sense that the
server would not be available unless the client launches his application.
This would "activate" the server part of the application and make it
available to anyone who can reach it (controlled by the client, if he wants
to let the requestor see his data).
Now the client, on normal startup, would just see his own data, via the
local access. But if he wants, he would request to change the "connect-to"
location to connect to somebody else's database.
I had this going via a thread and a network service that I created. But
in the .net environment, you need to have the server-class AND the
client-class both registered. If it's registered as a client, then you
cannot use it as a server.
What I will need to do, of what I can tell, is create a second .exe or
.dll file and run it as a seperate process via process control.
I will be looking into this later this week... I am cuaght up with other
stuff at the moment.
Thanks for your input.
Gary
Just for the fun of it !
|
|
|
|
|
Hi Friends
Here is a simple question in which im confused.
when we build our ASP.NET project . Does it get compiled or gets interpreted.
I know that many of us think that it is compiled but when i build my project i get the error one by one.
this means that it is interpreted.
If any one knows what is this please do let me know.
Naveen
Naveen
|
|
|
|
|
all the code is compiled. when is a different story. C# source behind file are compile in the dll, but aspx and controls are compiled on 1st access, hence the reason u can replace them at runtime.
Building a ASP.NET dll is a bit more tricky, and beyond the scope of normal human beings (but its all compiled)
top secret xacc-ide 0.0.1
|
|
|
|
|
i cant get ur point. somebody told me that ASP.NET pages are interpreted while aother applications are compiled.
Any Help
Naveen
Naveen
|
|
|
|
|
softp_vc wrote:
i cant get ur point. somebody told me that ASP.NET pages are interpreted while aother applications are compiled.
Fine dont believe me? Why do you ask then? It happens just as I tell you!
top secret xacc-ide 0.0.1
|
|
|
|
|
I have developed a windows service using VB .net but i can only installit in the computers that have Visual Studio installed. in other computers that have only Framework installed I get an IO.FileNotFoundExeption
Thnx...
|
|
|
|
|
Hi,
How do I prevent the paper being ejected when printing using the PrintDocument object? Everytime the PrintPage event handler exits, the printer starts the printing and then ejects the paper immediately. I still need to print some text in text mode (not graphic) after that using my own library. I already set the PaperSize property but it doesn't do any good.
Or is there a way to print in graphic mode without using PrintDocument?
Thank you very much.
|
|
|
|
|
I have a memory leak problem.
My remoting server runs on my development machine (2 1 Meg processors) at about 38mb
However when I run it on the target machine (2 2.5 Meg Xeaon processors with hyperthreading) its memory usage ramps up and up.
The only difference I can think of is the hardware architecture.
Has any one got any bad experiences using multiple xeon processors?
(OS is win 2K server)
MOO!!
|
|
|
|
|
If there is a difference, I'm betting it is only exposing a bug that exists in your code that isn't being worked on your development system. There isn't anything special that you need to do with your code to run on the different processors.
I'd run memory validation products on your code, and then check and double check for race conditions.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|
|
Crap, forgot which forum I was in, thought this was C++.
The garbage collector tunes itself to the cache size of your processor. I think the first generation is somewhere around the size of your processor's L2 cache. This can change when it collects. Also if the system is only hosting your service, then it is less likely to collect since there isn't as much need to.
Have you actually run into memory problems, or are you just worried. You can also add a call to GC.collect just to reassure yourself that there isn't really a problem.
Assuming of course that you aren't allocating unmanaged resources that you aren't freeing up.
I can imagine the sinking feeling one would have after ordering my book,
only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
|
|
|
|