Wings_That_Fly's Q&A profile
.NET Development stack overflow and memory corrupt when use DsBrowseContainer
[DllImport("dsuiext.dll", CharSet = CharSet.Unicode, SetLastError = true)] public static extern int DsBrowseForContainer(IntPtr infoHandle); public delegate int BffCallBack(IntPtr handle, uint message, IntPtr param, IntPtr data); [StructLayout(LayoutKind.Sequential)] public struct DSBrowseInfo : IDisposable { /// <summary> /// size of structure in bytes /// </summary> [MarshalAs(UnmanagedType.U4)] public int size; /// <summary> /// dialog owner /// </summary> public IntPtr handle; /// <summary> /// dialog caption text (can be NULL) /// </summary> [MarshalAs(UnmanagedType.LPWStr)] publ ...Show All
.NET Development CreateParameter give bad performance
We are working with MSSQL 2005 and ado.net framework 1 .1 During our performance tests over large DB (~1M records) I found out that when I run one of our queries, with embeded values in the query -string, instead of using the CreateParametr method, the query ran 40 times faster!!! The parameters are 2 strings (~30 characters) , the type in database is varchar(255). Wh at can cause such a huge difference in the execution time This is our AddParameter source: public void AddParameter( object parameterValue) { string paramName; IDataParameter IParam; //For string that is empty do nothing means null is entered to field. if (((parameterValue is string ) && (parameterValue.ToString( ...Show All
SQL Server Select Xml value
Hi guys , i'm some how a beginner to XML and i have a question suppose i have the following XML <league num="1"> <clubs> <club num="1">Aresnal</club > <club num="2">Chelsa</club > <club num="3">Man utd</club > </clubs> </league > <league num="2"> <clubs> <club num="1">Real</club > <club num="2">Barca</club > </clubs> </league> using Xml data type and xquery , how to get scalar value ,using xml.value , of all clubs with num="2" So , result should be result------------------------------------------------------- Chelsa ...Show All
Software Development for Windows Vista Windows Workflow Foundation BRE Does Not Update Value Type Fields of a Structure
The BRE of WF does not appear to update value type fields that are part of a structure. When the THEN action of a rule is executed and a calculation updates a value type in a struct, the value of the structure member remains zero. Turning on tracing of the execution of individual business rules shows successful execution of the assignments, but the targeted field maintains its initial value of zero during its use in subsequent calculations. No exceptions are thrown and tipping the BRE via the "update()" command has no impact on this behavior. In my case, changing the struct to a class cured the BRE of this ailment. Sorry you ran into this. We are aware of this issue and will be fixing it in the next release. Unfortunately, ...Show All
SQL Server =Globals.PageNumber & " of " & Globals.TotalPages
how do i get pagenumber and total pages when i try to put on the page header i get error: =Globals.PageNumber & " of " & Globals.TotalPages error: [rsPageNumberInBody] The Value expression for the textbox ‘textbox17’ refers to the global variable PageNumber or TotalPages. These global variables can be used only in the page header and page footer. Build complete -- 1 errors, 0 warnings any help please How can i do to change these something When i did this test, in my context menu appear "Select Body" and i don’t know how to do to display "Select 'Page Header'" or "Select 'Page Footer'"... anybody help me Turkaum ...Show All
.NET Development CLR and thread deadlocks
Hello, I'm hosting the CLR (.NET 2.0) in an unmanaged C++ app. The CLR is used for calling C# plugin functions through IDispatch. The C# plugins are COM visible classes and are created from the app main UI thread. They are mostly used for accessing the app through a COM primary interop assembly generated with TLBIMP.EXE. The interop between C# and the app is achieved through the default Microsoft COM wrappers. This is all working fine but I'm having a problem when the C# functions are called by the app from a worker thread. At this point the CLR attempts to interop with the app via the UI main thread which is causing a deadlock because that thread is locked while the worker thread is executing. From what I see in the call stack (b ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 360 Boat game with source
Hello I was playing about again the last 4 days and come up with a little boat game for the 360. The source code is very untidy but there might be something of use in there for some people. It was written for use on the 360, it might work ok for the PC. You can have 1 to 4 players and it uses some ai for the others. There's only 1 track at the moment - I may get around to fixing it all up into a proper game if there's enough interest or if an artist wants to help out. It plays a different sound effect when you cross the line and beat your own best score. My best lap is 8.07 (no down to a 7.96) seconds. Best to use a 360 pad but here's some keys if you feel the need. Q and E change the number of players ...Show All
SQL Server Microsoft Please help-Web Service Problem
We had an app that called across to the web services to run batches of statements. Everything worked fine and now they stopped working. The report can still be ran from report manager. What things do we need to check to find the problem Any help would be greatly appreciated. The app is getting the message back "The report server cannot open a connection to the report server database. A conection to the database is required for all requests and processing. SQL server does not exist or acess denied." ...Show All
Visual C++ Adding Resource data to an executeable without an RSRC section
Hello,I am currently stuck on a problem. I am trying to add an Icon to an external executeable.Meaning: a executeable, which I don't have control of the original source. Now I'm trying to add an Icon as resource to this executeable, but this doesn't work using the standart APIs "BeginUpdateResource", "UpdateResource", "EndUpdateResource". As they don't seem to add the resource table.I hope anyone knows how to get rid of this problem.I'm pretty sure it is possible, as I saw it "Resource Hacker" for example. Try the newswgroups at http://msdn.microsoft.com/newsgroups for such issues. You might get better answers for such issues there. OTP Thanks, Ayman Shoukry ...Show All
Windows Live Developer Forums About the license
Well I am developing a software that have to do with gps and mapping solutions. The software capture a .csv file and generate some graphics with it. I want to add virtual earth to it to show some results in a map, adding pushpin to it. I want to know if that is allow without some extra payment, or what can I do. How do I need to contact and what are the requeriments to add virtual earth to my application without any legal troubles. Thanks ...Show All
Visual C++ Error C2894
Hello. I am writing simple pakcet sniffer and i am using WinPcap. And when i try to compile my project occurs error C2894 "Error 1 error C2894: templates cannot be declared to have 'C' linkage C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\wspiapi.h 44 ". Here is the definiton of the template: #ifndef _WSPIAPI_H_ #define _WSPIAPI_H_ #include <stdio.h> // sprintf() #include <stdlib.h> // calloc(), strtoul() #include <malloc.h> // calloc() #include <string.h> // strlen(), strcmp(), strstr() #if defined (__GOT_SECURE_LIB__) && __GOT_SECURE_LIB__ >= 200402L #define _WSPIAPI_STRCPY_S strcpy_s #define _WSPIAPI_STRCAT_S strcat_ ...Show All
Visual Studio Syntax error when using Online MSDN
Hi, I have a problem with the Visual Studio 2005 help. Every page that loads i get a "line 1 syntax error" message box. It is DRIVING ME INSANE! I have tried to repair of the Document Explorer tool. I have looked for updates or KB articles and i can't find anything. I have tried turning off IE debugging but just the shape of the message box changes (and it doesn't ask me to debug), and the syntax error moves to line 2. A sample source for the page starts with XML so i thought that might be the cause but I am running the latest updates. Has anyone else had this problem Thanks in advance for any tips, Nathan Hi! I am having exactly the same problems. Just want to let you know that these problems ...Show All
SQL Server Deserialization failed: The type initializer for 'Microsoft.ReportDesigner.Drawing.RptStyleConstValue' threw an exception
The way we resolved this was by deleting the user's NTuser.dat file and having them log back on to create a new NTuser.dat file. This is not painless in that the user then has to reconfigure Outlook, recreate shortcuts on the desktop, etc., but it's better than reloading the OS. ...Show All
Visual Studio print without preview formating
I have the print without preview working except for 2 small items. 1. The data is not formated as it is with the preview (IE. with preview aligns the numeric field properly but without preview does left justivied) 2. I have total fields that are sum statements after the table data but it will not total just prints #Error Can someone tell me what routines I need to add to correct for this. Thanks ...Show All
Visual C++ How to convert 4 types of C++ strings?
I am new to C++ programming ... and it seems not everything is written in the books. Can anybody explain to me how to convert between the 4 types of string representations: char * char[ ] string class String ^ class Are there simple recipes for conversions Are the classes string and String^ only used with Microsoft C++, or with ANSI C++ as well It would be wonderful to get a sort of systematic overview, which I could not find in any book anywhere so far. HeinzKrug wrote: Yes, there are plenty of answers out there. Is there someone who has answered this question in a systematic way already If yes, could you give me any hints Any book, or any internet link I believe that my question is q ...Show All
