Leo Liu's Q&A profile
Visual C++ Dynamic References in C++/CLI
I have several mixed mode assemblies compiled for both x86 and x64 and renamed as follows: MyDll1_x86.dll MyDll1_x64.dll MyDll2_x86.dll MyDll2_x64.dll etc. When using these from a C# project I have been able to simply adjust the reference to dynamically point to the appropriate DLLs by editing the appropriate line in the .csproj file to use the $(Platform) variable: <Reference Include="MyDLL1"> <SpecificVersion>False</SpecificVersion> <HintPath>PATH_TO_DLLS\MyDll1_$(Platform).dll</HintPath> <Private>False</Private> </Reference> <Reference Include="MyDLL2"> <SpecificVersion>False</SpecificVersion> <HintPath>PATH_TO_DLLS\MyDll ...Show All
Gadgets SideBar Gadget and <object /> Tags
I assume that SIdebar is using a mini-IE7 window to display themselves, but I can't seem to get an <object /> tag to work in my gadget. Any idea why that wouldn't work Before I spin my wheels understanding what is happening, I wanted to make sure that there wasn't a security prohibition to using an <object /> or a <embed /> tag. Sidebar doesn't natively support WPF applications, although the guys over there have written Sidebar Styler , which adds this capability. If you want to go the IFrame route: There's this article which includes sample code and pics. And here's a sample WPF Gadget. ...Show All
Visual Studio Team System profiler says my project is creating a lot of strings, byte[] and type[]
I have run the profiler to check what objects are being instantiated by my project and it says that I am creating an awful lot of strings, byte arrays and type arrays. A lot of them (50,000) are coming from an external library I am using (oradirect .net, an oracle driver) but there are also quite a few coming from the constructor of my usercontrol (10,000). My usercontrol is nothing huge just a couple of toolbars, grids and a tree, all with no data. I have emailed the people who write the oracle driver but their profiler (AQTime) but didnt find anything: http://www.crlab.com/forums/viewtopic.php t=9112 . Here are some screenshots of the problem, which also shows the byte and type arrays: http://www.kevinandkiran.com/screenshot ...Show All
Visual C++ How to fix Incremental Link Error?
Hi all, I implemented a basic client application. It communicates with server and works properly. Building processes succeed just by giving the following warning: LINK : D:\DOC\Visual Studio 2005\Projects\Client01\Debug/Client01.exe not found or not built by the last incremental link; performing full link This warning occurs when building/rebuilding the project after cleaning the intermediate and output files. If the project is once built then this warning is not given. In the solution, I have only one project consisting of the following files(I also added wsock32.lib to Project configuration as the Linker Input in order to use the socket functions): main.cpp MyMessage.h MyMessage.cpp MyConnection.h MyCon ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Will XNA work with .......?
hey everyone im new to this forums and i just had a quick question but if this question has been already asked then you may lock it. ok my question is i recently downloaded Microsoft Visual C# Express 2005 will this work with XNA / is that the only program i had to download for XNA.. or in other words are there any other software i need to download to use XNA on August 30th or will XNA come with the other programs Thank You very much.. Kevin Cogger MSFT wrote: Actually, the C# Express you downloaded is exactly what you need. When we release the XNA Game Studio Express beta on August 30, it will integrate with your existing C# Express. Normally C# Express doesn't support add-ons, but this is a ...Show All
Visual Studio 2008 (Pre-release) Issus about implementing reliable in WCF
I add a reliableSessino element in my netTcpBinding. and set it's enabled attribute to "true". After send servial requests to service, I cut the net connection, then I receive severial errors: 1. The open operation did not complete within the allotted timeout of 00:00:00. The time allotted to this operation may have been a protion of a longer timeout. 2. Could not connect to net.tcp://10.102.13.118:11120/myservice. The connection attempt lasted for a time span of 00:00:00.4218750. TCP error code 10060: 3. The maximum retry count has been exceeded with no response from the remote endpoint. The reliable session was faulted. This is often an indication that the remote endpoint is no longer available. 4. This request oper ...Show All
SQL Server How to Change the Transaction Log File size to less than the Intial Setting.
I have H Drive with 12 GB size. The Transaction log file of my Database is given in H drive. i.e H:\Krishna_log.LDF. My database initial setting for the Krishna_log.LDF is 10 GB. so currently I can see 10 gb file occupied in the H Drive. very soon my database Krishna_log.LDF is going to increase 10%. Even though If do Backup/Shrink, it will reduce to the initial to 10 GB. So all I need is, change the initial size of the Krishna_log.LDF from 10 GB to 5 GB. Pls give your suggetions...(I dont mind to shutdown,Restart the Sql server do these changes to achive this Task). Thanx in advance. Regards, Krishna you can try this: 1. backup you database!!! 2. check to ensure there is open transaction (dbcc opentran) 3. run sp_det ...Show All
Gadgets Local cache of web images
I am writing a gadget to view daily comics. I would like to save the images to a local folder. Does anybody have any suggestions My gadget will display the comics I just need advice on how to save the images. Thanks. I'd forgotten about REGASM! Been a few years since I've touched .NET. Ah, the problems I had trying to distribute assemblies through MSI packages - it's all flooding back! You can use it to get the registry keys: regasm.exe <file.dll> /regfile:myreg.reg I wouldn't use it in your Gadget though, as it requires privilages that a "User" doesn't have. ...Show All
Visual C# Foreach problem -->
I am using an OpenFileDialog. OFD.InitialDirectory = Environment . SpecialFolder .MyDocuments.ToString(); if (OFD.ShowDialog() == DialogResult .OK) { //I need a FOREACH statement here// } Now, I need to open multiple files and put them in a list view. How can I do this I have tried foreach (OFD.FileName file in OFD.FileNames) {}, but I need a TYPE. This doesn't work. private QuartzTypeLib. FilgraphManager graphManager; private QuartzTypeLib. IMediaControl mc; private QuartzTypeLib. IBasicAudio audio; private QuartzTypeLib. IMediaPosition position; private QuartzTypeLib. IMediaEventEx mEventEx; private void openToolStripMenuItem_Click( object sender, EventArgs e) ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Xbox360 to PC Comparison
Does anyone have an idea what performance I can expect from the Xbox360, I am writing my game purely for the console because I dont want to have to write a load of code for dealing with different spec machines (throttling the number of creatures, etc) and different types of input. The game I am porting is this (original is in vb.net and MDX) - http://www.entombed.co.uk I have managed to port the models, parrallax occulsion mapping shader and per pixel lighting. But I dont know how the Xbox360 is going to perform. My PC is this spec ( cr@p ish) - Intel P4 2.4 (400 FSB) ATI X800 XT PE 768 MB AGP x4 I am receiving an excellent frame rate from my PC and wondered what I should expect from the console, will it be twice as quick or mo ...Show All
Visual Studio Express Editions Adding more than one record
I can't seem to add more than one record at a time. If I want to add another record after the last record added, I have to go out of the programme completely and re-run my programme. If I don't, an exception is thrown, any ideas why this is happening Here's my code below: Private Sub btnSave_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click Dim newVenueRow As WhiteboardDataSet.VenueRow newVenueRow = Me .WhiteboardDataSet.Venue.NewVenueRow() newVenueRow.VenueName = txtVenueName.Text newVenueRow.description = txtDescription.Text Me .WhiteboardDataSet.Venue.Rows.Add(newVenueRow) Try Me .Validate() Me .VenueBindingSource.EndEdit() Me .VenueTableAdapter ...Show All
Visual C# change hex string to byte array
How can I change a string of Hex (2 chars) values to an array of bytes. if I have: string strNumber = "0543af02dda1e6" to: byte[] byteNumber; I already make to get a substring of two characters from strNumber and use in a for(...,...,...) loop System.Convert.ToByte(strSubstring, 16 ); ------------------------------ Q : is there any more efficient, fast and elegant way to do it. Your for-loop is good. Now convert the Substrings with: byteNumber[ix] = byte.Parse(strNumber.Substring(2 * ix, 2), System.Globalization.NumberStyles.HexNumber); ...Show All
Visual C++ STD_OSTREAM Compile Problems
Hello everyone. I am stuck with a rather simple but sticky problem. I am using GALib from MIT's AI research area. The code of course is in C++ but for an early release (ver. 3). I have download, and unzipped the code, and made the changes in directory pathing to compile the code. I am receiving a series of error messages regarding the ostream and how it is declared or not. Not having ver. 4, I have attempted to use ver 4.2 and 6.0. As I use a more up-to-date ver of C++ the errors proliferate. I am not certain what appraoch to take. Can anyone offer a sugestion. Code below as is error messages. #ifdef GALIB_USE_STREAMS int write(const char* filename) const; int write(STD::OSTREAM & os) const; int read(const char* filename, GAB ...Show All
Visual C# Events problems.
Hello, I try to make a class (called voltage) to use in a Usercontrol (called switch). I like to know when one of the propertys of the type voltage change by means of an event triggerd in the voltage class, and then trigger a event in the class switch to notify the user. (see also my last post) here is the code for the voltage class: Hmm, you declare the voltage objects using lowercase ('a', 'b', 'c') but you attach to the events using uppercase ('A.VoltageChanged' etc). This leads me to suspect that you haven't posted an actual copy/paste of the real code... ...Show All
Windows Forms Ctrl + Alt + Delete interactive login
So I would like to change the way the User Logs in. Well more so the Help. My company is currently using a program called Track IT which will allow the user to go on a website to change their user name and password. The problem is how are they to get there if they cannot log in I want to know how to re-write the code to change the HELP link that normally takes you to the picture of the keys being pressed to take you to the webpage. Now you might think why would you want to go to a webpage, well it dosent look like a webpage it looks like an actual application. Right now we have change the code a bit to have directions with a temp username and password and when they log in to that they will go directly to the Track It page and i ...Show All
