ShEi's Q&A profile
Visual C++ C++ Generics issue
Hi. I'm having a problem converting some C# to C++/CLI, which involves generics: //// C# code (compiles and runs): ///////////////////////// // The constraint requires the generic parameter T // to be convertable to the type of the derived class: public abstract class MyBaseT<T> where T : MyBaseT<T> { public MyBaseT() { } } public class MyDerived : MyBaseT<MyDerived> { } //// (equivalent ) C++/CLI code: //////////////////// generic<typename T> where T : MyBaseT<T> public ref class MyBaseT abstract { public: MyBaseT() { } }; public ref class MyDerived : MyBaseT<MyDerived> { }; /// Compiler error: Error 1 error C3393: syntax error in constraint cla ...Show All
Visual C++ How to get a handle of a RAWINPUT structure
Hi to all I have build a client-server system in which I am getting raw input from a remote machine and succesfully transmitting the RAWINPUT structure to a local one. What I want to do is to be able to immitate the WM_INPUT notification and be able to post a WM_INPUT message to a process (eg a game) running on the local machine and see if it "sees" and processes it. The problem I am facing is that the lParam of the WM_INPUT message is a HANDLE to a RAWINPUT structure. Thus, I need to create a handle to my RAWINPUT structure and use this instead of the simple pointer I have. My question is whether there is indeed a way to do this or I am stupiditly trying to do an infeasible thing. I have tried several sample codes which create handles of ...Show All
SQL Server Problem with output parameters that are varchar and null
I am using version 9.00.2047.00 SP1 of Visual Studio 2005. Using ADO.NET, I have been unable to get the Execute SQL task to successfully return the value of an output parameter defined as varchar or nvarchar when the value is null. No other data types seem to have this problem, including the sql_variant data type. Here is the stored procedure I am calling: create proc spx @in int = null output, @vc nvarchar(10) = null output, @dt datetime = null output as select @in = null, @vc = null, @dt = null return The variables to which the three output parameters return their values have a data type of Object. The task runs fine when the integer or datetime parameters are used, and the variables can be identified as null using IsDBNull ...Show All
Visual Basic Debugger problem "The breakpoint will not currently be hit. No symbols have been loaded for this document
There was a similar question posed on the C++ forum back in February to which I responded yesterday, but unfortunately, did not get a response. I am therefore putting this question in the VB forum. I have a VB 2005 project which is actually an add-in to Outlook 2003, which was I was able to debug fine until earlier this week. Now I cannot debug it at all - the message in the subject is displayed when I hover the mouse over the breakpoint which shows a yellow icon in place. Can anyone here tell me what I should do to correct this I had the same problem. I fixed it for a moment by changing the project's "Generate Debug Info" option from "None" to "PDB Only. " To get there, right click the project ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D Platform Game Help
I'm making a remake of super mario world. The project is going good, i have the basic physics down and just need to draw the level and set the bounding boxes. The question is, does anybody know a program that could create an image from tiles. I have tried creating the map in XNA GSE but all the drawing slows it down. What i need specifically, is a map/image of a level. I could use the original from the game, but i want to have custom levels that i created, also there levels have slopes and stuff and my project isnt fitted for slopes. Besides that i figured once i get it up and running i would try and make a tutorial. I had also my doubt of the XNA performance, so I decided to test this. I am drawing a 80*80 tile 600 times ...Show All
Software Development for Windows Vista Vista "Catch 22"
Having tested the first Beta issue of Vista Ultimate and found the limitations (so it was lucky that I have seperated hard drives (PATA and SATA) one of which was still running XP) I was pleased to download Vista RC1 build 5600. Having created the disc (only 2.5gig this time) I tried upgrading the working Vista drive. Attempt 1 failed as Norton was installed and had to be uninstalled. Attempt 2 failed due to another program getting in the way. Attempt three locked up everything solidly and from then on could not get back into the other hard drives. Went for a new install which was a doddle. No problems at all except you have to register it within three days so an absolute emergency to get back on line. No problem installing the Tisca ...Show All
SQL Server List of fixes in VS SP1
Can someone please supply a link to RS specific features/fixes in Visual Studio SP1 e.g. what fixes have been made to the printing activex control, or the report viewer control Thanks There is a a link to a page will all the bug fixes here . You need to sign in to passport before you click on the link ...Show All
Visual Studio 2008 (Pre-release) List DependencyProperties?
How can I get a list of DependencyProperties from an object The following helper methods can do the trick: public static class DependencyPropertyHelper { public static IList < DependencyProperty > GetAttachedProperties( Object element) { List < DependencyProperty > attachedProperties = new List < DependencyProperty >(); foreach ( PropertyDescriptor pd in TypeDescriptor .GetProperties(element, new Attribute [] { new PropertyFilterAttribute ( PropertyFilterOptions .SetValues | PropertyFilterOptions .UnsetValues | PropertyFilterOptions .Va ...Show All
SQL Server UPDATE where table_name is a parameter
Hi everybody, I'm creating a trigger on update of a table. It simply updates the last change of a specific field to all other tables linked to this field, which is a sort of master-key of the whole database. This trigger works on two different databases: in the first one the tables are "fixed" and I use this statement: update [Dda_additional] set site_id = (Select site_id from Inserted) where site_id = (Select site_id from Deleted); In the second one the number of the tables is a variable, because the adminsitrator can create and delete them with a web-application. That's why I'm using a cursor to extract the name of the tables in this database and then I pass these values to the update query. Here's my code: DECLA ...Show All
Windows Forms Activation failed - The system cannot find the file specified error...
We are using ClickOnce to distribute our application. The application is available in offline mode and also the check for updates mode is set to "Before application starts". Below is the error message that I get when I publish a new version and launch the application from the start menu. I get this error only if I have an earlier version of the same application installed on my machine. If I uninstall the application and install after or try to install the same application on a machine that does have it, it works just fine. So it seems that the problem is mostly related with the update. I would really appreciate if you can take a look at the error message below and provide you insights. Thanks, Murat PLATFORM VER ...Show All
Visual C++ COM newbie question
when i use COM objects from C++ i need GUID and interfaces definitions.. i usually get them from an header. I noticed also that when i add a reference to a COM object (dll) in a C# project, the enviroment get directly all those informations about classes and interfaces. this suggest me that i could use COM objects even without headers. So my question is, it is possible to retrieve guids and interfaces definitions from a com object thanks to everyone in advice :) C# IDE does this by reading COM component type library. To to the same in C++ use #import directory with COM Dll name. It reads type library and generates wrapper C++ class which can be used by client code. ...Show All
Visual Studio Express Editions Yet another printing question
Hi there everyone.... I have done tons of reading in this forum and others about the best way to print documents (word and pdf) and have mixed reviews. If anyone can answer my question I will be eternally grateful... here goes... in .Net's PrintDocument class, how do I print a word document using this class I have read that you need to stream text to the class, but if I open a streamreader of the word file, will it lose the formatting I know I can use interop to do this printing, but all documentation I have read indicates I shouldn't do this, and besides I don't get the printer control I need when doing this. any ideas or suggesstions will be helpful.. Thanks Justin ...Show All
Visual Basic problem in transferring files to Unix box
When i transfer a .txt file to a unix box using the microsoft internet transfer control , i am getting "CONTROL + M " on each line . This means that the transfer was not proper . This is my code . Code: Dim b() As String Dim strURL As String Inet1.URL = "ftp://ip address" Inet1.Protocol = icFTP Inet1.AccessType = icDefault Inet1.UserName = "root" Inet1.Password = "Compaq" Inet1.RemotePort = 21 Inet1.RequestTimeout = 100 Inet1.Execute , "PUT C:\hosts.txt /in/tmp/hosts" Is there anyway to transfer the file in binary sars Line-endings in Windows are carriage return + line feed. In *nix, it i ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Can one fill a polygon with a transparent color
Hi all. I'm currently writing a GIS application in which I need to draw Polygons and fill these with a transparent filling so that the user to some extend is able to see the Map beneath the polygon. Is this in any way possible. Thanks Yes, this is perfectly possible - but it's very difficult for me to provide you with much more information as you've not given us much detail to work with Which languages/API's/technologies (e.g. FixedFunc or Programmable) are you using Basically it'll come down to using blending - under D3D9 you'd set the SRCBLEND and DESTBLEND render states and enable alpha blending. You can then provide constant, per-vertex or per-pixel alpha values that can vary the level of transparency. The SDK docume ...Show All
Visual Studio VSS explorer on Vista RC2
We're having problems with VSS on Vista RC2. I ran VSS explorer on Windows XP for years with no problems. Now on Vista the symptoms are: I can check out a file and it shows with my username as checked out. Within a few minutes the file listing will refresh and no longer show that I have it checked out - so I can't check it back in or undo my checkout. But if I look at properties for the file, it does show that I have it checked out. VSS will let me check it out a second time, and then properties shows I have it checked out twice. At this point, I can check both copies back in from the "checkout history" tab and it will merge any changes and things are okay. But this behavior is terrible. Any idea what I'm doing wrong Is there a ...Show All
