Rykin Poe's Q&A profile
Visual C++ error C2144: syntax error : 'int' should be preceded by ')'
Sorry to bother with simple error, but i really can't find "int" in the code -_- below is part of the code and the line that's giving all the syntax errors is highlighted in red. Hope someone can help me, thx! I've already changed the compiler option to use /clr::oldsyntax too. template < class _Container> class string_append_iterator { protected : _Container* container; public : typedef _Container container_type; typedef void value_type; typedef void difference_type; typedef void pointer; typedef void reference; explicit string_append_iterator(_Container& __x) : container(&__x) {} string_append_iterator<_Container>& operator =( const ty ...Show All
Visual Studio Team System TF82001: MS Project can't connect to Team Foundation Server
I have a weird issue. If I right click on a work item and click "open selection in MS Project" the selected work item appears in MS Project. BUT, if I save this file and then open it again I get the error: "TF82001: Cannot connect to the Team Foundation server. Please contact your server administrator." I'm going to reinstall the TFS client again to see if that resolves the issue. Jason, We are still working on the problem. Can you try the following as a workaround and let us know if that helps 1. Select a few workitems in Visual Studio. Right-Click and open in MS project. Then try both of these: 2a. Now, in this instance of MS Project that you just opened, go to file -> new and then connect the new project plan to the ...Show All
Visual C# Conversion of DateTime to FILETIME
hi, I need to convert a date time value to file time, i tried this .... FILETIME ft = new FILETIME (); //from System.DateTime to System.Runtime.InteropServices.ComTypes.FILETIME ///////////////////////////////////////////////////////////////// long hFT1 = DateTime .Now.ToFileTime(); ft.dwLowDateTime = ( int )(hFT1 & 0xFFFFFFFF); ft.dwHighDateTime = ( int )(hFT1 >> 32); ///////////////////////////////////////////////////////////////// in order to check that conversion is right I converted file time back to date time using this code ... ///////////////////////////////////////////////////////////////// //from System.Runtime.InteropServices.ComTypes.FILETIME ...Show All
Visual Studio Express Editions How to start process in maximized mode?
Hi, I want to start process maximized.. But its not working for me.. I am using Local System account to start this process.. here is code .. which i have tried.. System.Diagnostics. Process oProcess = new Process (); oProcess.StartInfo.FileName = @"E:\Program Files\DAP\dap.exe" ; oProcess.StartInfo.Arguments = "" ; oProcess.StartInfo.UseShellExecute = true ; oProcess.StartInfo.RedirectStandardOutput = false ; oProcess.StartInfo.WindowStyle = ProcessWindowStyle .Maximized; //oProcess.StartInfo.CreateNoWindow = false ; oProcess.Start(); Above code start a process successfylly, but it keeping hidden .. I can only see in Task manager's process list. Thanks, I ca ...Show All
Visual C++ More PDH trouble...
And now, I don't have the slightest clue where I'm going wrong - hey, at least it compiles. Here's the code: /* Este arquivo trata de verificar a carga de * processamento e a memoria livre do computador. * O resultado destas funcoes sera usado dentro da * funcao main e enviado para o cliente atraves do * servidor, a cada pequeno periodo de tempo. * Estas funcoes usam a interface PDH (performance * data helper), que interage com o registro do Windows. */ #include <windows.h> #include <stdio.h> #include <pdh.h> #include <pdhmsg.h> long getload(void){ PDH_FMT_COUNTERVALUE value; PDH_STATUS status; HCOUNTER pCounter; PDH_RAW_COUNTER raw1; LPDWORD type = NULL; WORD dwUserData = 0; PDH_HQUERY query = NULL; char c ...Show All
Visual C# SQl server authentication issue in C#
Hi Guys, I have a tool written in C# which connects to a remote SQl server 2005. Its working fine while I use "Integrated Security". However, I want to login the database using another credential instead of using the currently credentials associated with the tool. The reason for this was because not all the users using this tool have permission to access the database. So, I need sort of impersonation to allow any user using this tool to connect to the database. Is there any simple and efficnet way to do this Thanks. that means, sql server authentication is not enabled. Do you mean I just need to enable both authentications Let me try. But is this a good practise Thanks ...Show All
Software Development for Windows Vista Visual Studio 2005 Macros and 5744
Macros in Visual Studio seems to have stopped working in Vista RC2. When attaching to vsmsvr.exe exceptions are thrown when you try to run a macro from devenv.exe. From debugging the disassebly I think it is a access denied message. I also saw a string "Bad IL format" if that helps. Anyone have an idea how to solve this issue without waiting for RTM or going back to RC1 Has anyone gotten anywhere with this I am running into it too. I have a clean VistaRC2 install (32bit) followed by a clean VS2005 install (no SP1) Do we really just have to wait for VS2005 SP1 to resolve this thanks :-) -john ...Show All
SQL Server Msg 15259, Level 16, State 1, Line 1 The DEFAULT_SCHEMA clause cannot be used with a Windows group ...
Hi all, I'm trying to (a) resolve/understand the issue for this error; (b) find the correct place to look up SQL Server Error messages like MSG 15259 The full error message is: Msg 15259, Level 16, State 1, Line 1 The DEFAULT_SCHEMA clause cannot be used with a Windows group or with principals mapped to certificates or asymmetric keys. Now, that does seem reasonably descriptive. My confusion is due to the fact that the SQL I ran was based on the MS template: Templates\Users\Create Schema User which is: -- =================================== -- Create Schema User template -- =================================== USE <database_name, sysname, AdventureWorks>; GO -- Create a login using a Window ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Frames Per Second (FPS)
I've recently added an FPS component to my engine and I am getting different results than I thought I would. With nothing being rendered, I get about 1400 fps - so far so good. But when I add in a small 32x32 grid, it drops all the way down to 78 fps - seems very low for just a small grid. When I then add in my skydome, it drops down to 48 fps. I haven't tried putting in some boxes or anything else yet. Does this seem a bit off I am using variable time step, vsync disabled, and a 1024x768 backbuffer. PC Specs: 2.8GHz Pentium D dual core 2 G RAM ATI Radeon X600 256 MB Windows XP MCE (minimum apps running) How are you starting the project If you run in Debug mode you will get a MUCH lower fra ...Show All
.NET Development How does .NET Data Provider for SQL Server convert varchar data to Unicode?
When the data provider returns converts the value in a varchar field to a .NET string, how does it determine the encoding conversion to perform My guess is that it's determined by the collation setting on the column, but I'm not sure For example, if the collation is SQL_Latin1_General_CP1_CI_AS, the Provider converts from code page 1252 to Unicode. Does anyone know for sure the strategy applied here Potts -- >> My guess is that it's determined by the collation setting on the column, but I'm not sure This is correct. The server sends the client the collation for the column, and we store this as part of the column's metadata. When you ask for the string value in your .NET application, we conver ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Slow typing text like in RPG's
I know how to display text on the screen using bitmap fonts, but I would like to know how to make the text appear like it does in role-playing games. You know where the text is slowley shown on the screen one letter at a time. You could create a class and store the entire string. Then on the update method increase a counter. Then show x number of letters of the string based on the counter value, etc. You could mess with counter increment or do a mod, to change the speed of display. Or you could use a System.Timers.Timer and increment the letter count on elasped. ...Show All
Visual C++ Unhandled exception
Hi All, hr=CoCreateInstance(CLSID_Component2 ,NULL,CLSCTX_INPROC_SERVER,IID_IUnknown ,( void **)&pIX); //REsult of HR is s_ok but when i am calling following function i am getting error as: Unhandled exception at 0x00000000 in App.exe: 0xC0000005: Access violation reading location 0x00000000. hr= pIX->SetAuthor(( char *) 'd' ); Additional info: The code lies in lib .which is then added to dll. Plz help . Take a look on these tips for debugging, http://www.codeguru.com/forum/showthread.php t=360659 . ...Show All
.NET Development sql injection :: filtering datagridview
I use a textbox to filter my datagridview's binding source on keydown. I'm facing problems if the user enters apostrophes and other undesirable characters into the textbox. "Fred's furnace" is a data item that is available in the datagridview. But when I enter "Fred ' s" in the textbox search it causes an exception. Please can someone point me to a how-to in this case of avoiding sql injection. Thanks in advance. Filter datagridview you could just use the string.Replace to replace single apostrophes with double ones -> dataGridView.Filter = "Country = '" & textBox1.Text().Replace("'","''") & "'" This should work for you. ...Show All
SQL Server Database is read-only.
Hi I have been learning on how to use the new features of the .NET 2.0, and Well I using VS2005 and everything is pretty straight foward. I did a Membership webform where you log in and create users and roles etc. I installed the SQL Server 2005 express as my Data provider and thats where my Tables are. I used the aspnetsql_reg comand to integrate the server to this application. Anyway my problem started when i decided to copy my project to my IIS server and well when I run the app from the Browser tells me that he Database It's set to Read-Omly and therefore it cant update it. This happens right after log in. but then I open the App. on hte VS and it runs find. This is the error: Exception Details: System.Da ...Show All
SQL Server How to use Alerts
I have two fields in my report(Start Date and End Date).Start Date should be earllier than End Date.Please help me how to use alerts. Your expression definition in "Validate" parameter is wrong. If you followed the steps from my link you should have something like this in your Validate.DefaultValue(non-queried): =CODE.CheckSignificantDate(Parameters!<name of your "date from" parameter>.Value,Parameters!<name of your "date to" parameter>.Value) i.e. =CODE.CheckSignificantDate(Parameters!DateFrom.Value,Parameters!DateTo.Value) Ofcourse you have to add to your report "CheckSignificantDate" function (everything is explained in the ...Show All
