Garrett Fitzgerald's Q&A profile
Visual C++ Singular preprocessor definition needed
This is my first post, I hope to be clear enough (sorry for my eglish) and I hope to be lucky and find the answer to a very big problem. I have a VC++ project and I need to create, during the compilation, a define that has the same name of the file that I am currently compiling. For example, if when I am compiling a file called Main.c I need to create runtime a define #define main 1 I do this by specifying the in Preprocessor Definitions section $(InputName)=1 The problem is that the command above create a define #define Main 1 instead I need the name of the file in lower case . I thought in the beginning to create a custom task in M ...Show All
Visual C++ Processes List
Hi, I want to create a list of all the running processes (in c or c++) and their properties (i.d. , name, user-name, IO-Reads and more). The list must include all the processes (idle system process too) of all the users of the computer (administrator, LOCAL SERVICE, NETWORK SERVICE and all the others). Does anybody knows how to do it Thanks I am sorry, I have no further idea. I just used the MSDN sample, added the code for the debug priviliges and I could see the processes name of all processes on my machine. OpenProcess succeeded for every process. If it fails on your machine, what does GetLastError say I have really no other i ...Show All
Visual Studio 2008 (Pre-release) TargetName Does not work for me.
I have problems getting the Targetname property in ANY setter to work (inside a datatemplate). How Do i access specific elements within a datatemplate to change/animate with a animation/property trigger Let me just emphasize this is within a datatemplate. Outside the datatemplate works reasonably well ...Show All
Visual C# C# Forms Question
Hi, I am creating a class library(dll) in C# with a Windows Form in it. It runs fine in the app that I load the dll into. I have a problem with the items that I add to the form, such as a pictureBox. I have added a few to the form but when I try to access them in code such as changing the image in the pictureBox, it is not even recognized as being an object, intellisense does not see it. Error is, An object reference is required for the nonstatic field, method , or property, and then it indicates the object I am trying to use. Does this for any object that I add to the form from the toolbox. Any direction would be appriciated. ...Show All
Smart Device Development How to persist form control selected value between application session?
I am new to the compact framework and I'm I have to get an application put together quickly, I hope someone can help me with a basic question..... I need to persist between application sessions the selections made in combo boxes. In the compact framework what is the best way to do this Thanks in advance for any help, C there is no 'best' way, but there are plenty of options... write the selected indices to a database/textfile/xml file, and when the app loads, have it read these values ...Show All
Visual C# ValueType arrays
I'm trying to copy a cutomized valuetype to string type. string source[10]; // bcString is a ValueType that hold a string object and implicit // conversion from string type to bcString bcString target[10]; target = source; I have tryed with the syntax target = (bcString[])(System.Array)source; but I get an execution error (cannot convert...) Any hints Thanks, Felice Russo The only way this is possible is if bcString inherits from string. What you will have to do is copy each value one by one with a for loop. ...Show All
Visual Basic WebPage Interaction
HI I Hope this is the right place to ask this! I have a browser window which i use to connect to my bank accounts web Page. I use SendKeys to communicate with the webpage and to download my accounts. I have used 'Microsof Money' in the past and they are able to do everthing automatically without even opening the webpage! I wonder if any of you know how this is acheived any clues would be appreciated Thanks in advance Mike Pooley Hey Mike, The webpage is there, you just don't see it. The program is communicating directly with the website as if it were the browser. It then takes in the data stream which normally is displayed as a ...Show All
.NET Development Understanding the role of form="unqualified"
I roundly dislike the prefixing of attributes in XML files that won't go outside my application. (They are so thoroughly encrypted they won't do other much good:-)) And I much prefer to store info as attributes rathr than elements when I can get away with it. So I have discovered the value of setting form="unqualified" in the schema. The question is "where should I be doing this." If I get things exactly right I can have things like <tag attribute="value"/> that read into a datatable aok. If i don't get things exactly correct then to get the data loaded in to a datatable i have to code <t ...Show All
SQL Server SSIS Installation Problem
I tried removing and reinstalling SQL Server 2005 Developer Edition for three times, including "all-at-once" component installation and "component-by-component" and I just can't get Integration Services to install. Here is the setting: - I have WinXPPro SP2 - I had SQL2K and removed it - I installed SQL2k5 (as described above) I am getting the following error: Microsoft SQL Server 2005 Integration Services -- A component that you have specified in the ADD_LOCAL property is already installed. To upgrade the existing component, refer to the template.ini and set the UPGRADE property to the name of the component. This component of course is no ...Show All
Software Development for Windows Vista Using infocard without installing certificates on the client?
According to http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=311594&SiteID=1 it should be possible to use InfoCard without installing the service certificate on the client, but if I change the wsFederation InfoCard sample by removing the identity tag from the client endpoint configuration I get the error "The incoming policy could not be validated." (Without this change, the sample works correctly). I want to do this because I want to use InfoCard in a ClickOnce deployment scenario without having the need to burden the ClickOnce deployment with certificate installations (see my question http://forums.microsoft.com/MSDN ...Show All
.NET Development .NET Windows Service
Hi, I am having some issues running my VB.NET windows service on SOME windows 2000 machines. The service works fine on Windows XP, and fresh installs of Windows 2000. The error I am receiving doesn't provide me with any helpful information (it is listed below). If anybody has some ideas on where to start to sort this issue out, I'd love to hear them. Thanks, Nathan Output from the Windows Event Log --------------------------------------- Event Type: Error Event Source: .NET Runtime Event Category: None Event ID: 0 Date: 19/12/2005 Tim ...Show All
Visual C++ Im new, need overview
Hey, ive just joined the network, i stated using visual studio 6 c++ , and began learning the basics like the beginners hello world console application and learning basic structure on coding. then my firend told me to scrap VS6c++ and use the Visual Studio c++ express 2005, and the compiler doesnt understand c++ coding, so i type in the basics to just recap, //blah blah #include <iostream.h> int main() { //blah blah cout << "Hello, World!" << endl; return 0; } typing this in doesnt work, its now as so #include "stdafx.h" int _tmain( int argc, _TCHAR* argv[]) { char ...Show All
SQL Server sp_dboption
I noticed that BOL says that the above is possibly going away. What's the official way to print out all your db options once it goes away, i.e. what are we supposed to do to quickly look at dboptions with doing sp_dboption 'databasename' No arguments on the method. However.... sp_dboption also allowed you to SET options. Most of those are covered in the ALTER DATABASE statement, but I can't find any way of setting the 'select into/bulkcopy' option. The old way was: EXEC sp_dboption 'mydatabase', 'select into/bulkcopy', 'true' but there is no way to do this in ALTER DATABASE.... My question: what is t ...Show All
Visual Studio 2008 (Pre-release) How do I use the ScrollBar ?
I am kind of having a hard time figuring out how to use the scrollbar. I have created my own Canvas that displays a document. So I have a viewport (wich shows a part of the document), and a document (wich is basically another Canvas). How do I calculate and set the parameters for the scrollbar now So that the scrollbar reflects size and postion of my two Canvases For example: How do I calculate size scrollbar's viewport (ScrollBar.Viewport) so that it reflects the size of my Docment and my Viewport. What do I set for Scrollbar.Minimum and Scrollbar.Maximum Is there maybe an example around on how to use the ScrollBar I don't want ...Show All
Visual C++ aspell compilation problems
Hi, I tried to post on the forum but it kept coming up with an internal error so i was wondering if you could help me with the following:I have recently been trying to compile aspell (a spell checker written in c and c++) in visual studio .NET (2003) which has taken forever but i managed to get it to compile a dll now. When i come to add this dll file into another project which will be using the methods from this dll it keeps giving the following error and not allowing me to add it: "Add Reference: Error adding reference to the project.". Does anyone have any suggestions on how to overcome this Any information woul ...Show All
