MagicM's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Blitting?
I've checked through the XNA Documentation, but there doesn't seem to be any way to 'blit'. For those of you unfirmiliar with 'blit': Blit is a way to draw something. For example, say you create a "Texture2D" variable, set the size etc... But the texture is blank. The normal way to create a texture to this is to load up a bitmap image with it through the ContentManager, right But what if you want to use a whole sprite-sheet with many images Back to the blank, say, 65 x 65 bitmap image, you obviusly don't want this 2D image of the player to be a whole 1024x768 sprite-sheet. So this is where I used blitting in other programs, it basically asks for the x, y co-ordinates, and the length of the bitmap and takes a picture from that x,y and 'c ...Show All
Visual C++ Problems verifying login against AD with more than one domain
Hi, Searched the forum and net for help with my little problem but haven't found anything, please redirect me if you know the place. :) Anyways I have this small C++ program that verifies user login and password against a domain in AD. Works fine when there's just one domain to take care off. But now a customer wants to use it in an environment were they have more than one domain. I'm quite sure I tested against more than one domain when I wrote the app, but I could've done it wrong. AD is not my strongest side. It could be that they have one domain with subdomains, and I want to verify against the subdomains. This is the code i Use to verify: hr = ADsOpenObject(CA2W(cDomain), // Path to AD. CA2W(login), CA2W( ...Show All
Visual Basic save as new project
I want to open an existing project in vb 2005, modify it and save as a new project keeping the existing one unchanged. Is there a way of doing this. In your senerio you will have two project files in the same directory.. OriginalProjectFile.vbproj & NewProjectFile.vbproj...and both files will have the same source code files attached to them... If your intent is to make a back-up before continuing work...I would suggest coping the whole directory as mentioned above! ...Show All
Visual Studio Exception occured on closing Report Viewer
Hi, I have a problem that if I close report viewer before it has displayed data completely, it throws an exception that "<Application.exe> has encountered a problem and needs to close.". Also asks to send report to Microsoft. I have used Try-Catch block, but it is still thrown. Please help me on this. This is a known bug in the viewer control. You can work around the problem by adding the following code to the FormClosing event: ReportViewer.CancelRendering(System.Threading.Timeout.Infinite); ...Show All
Visual Studio Anonymous access and SSL
I've got my VSS database configured for web access using SSL and the VSS Web Service. Should I be allowing anonymous access to the VSS Web Service virtual directories I think this is the default set-up, but want to be sure. I had loads of problems getting this to work at all, so I have manually configured just about everything. I do require an SSL connection to the service, so VSS usernames and passwords should be encrypted and I should be good to go correct Thanks. Sorry, let me clarify... I get that no matter what I need VSS user accounts. What I am confused on is if those accounts need to be synched with the users NT login I understand this to be the case with VSS Internet over H ...Show All
.NET Development Bug? : Sgen breaks web-service serialization
I am using the noaa weather web service and it works fine if I have not run sgen on the assembly. I have sgen disabled in the project settings and instead run it explicitly in the main build. I run sgen using the command: sgen /a:myassembly.dll /force /compiler:/keyfile:myassembly.snk This creates an [assembly_name].XmlSerializers.dll and when running the application again, the same call to the web-service fails with the following exception. This is internal to the web-service code so I'm stuck for what to do other than not run sgen: System.InvalidOperationException: There was an error generating the XML document. ---> System.ArgumentException: Item has already been added. Key in dictionary: 'myassembly.gov.weather.www.productType' ...Show All
Visual Studio Express Editions Receiving Serial Data
Hi, I am very new to this, I design electronics and for the first time I need to create an application myself which can comminucate with my hardware. After a few hours I managed to place buttons and get the app to send data bytes to my hardware which is great but now I need to recieve data and place it in to a box on my app. Please can someone paste some code so I can see how this is done Many thanks.... This is the code I am using to send the data with the button..... Private Sub Button11_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click ' Send strings to a serial port. Using com1 As IO.Ports.SerialPort = _ My .Computer.Ports.OpenSerialPort( ...Show All
Software Development for Windows Vista [RTM Vista] - Problem binding an ssl certificate to an ip:port, nothing works :-(
Look this link. I'm running on Windows Vista RTM as an administrator. The certificate has been crafted with makecert for developing purposes. I'm getting error 1312 while registering it to whatever ip/port. I need this certificate to authenticate a WCF metadata exchange through https. I tried to logon myself using "net use" but nothing seem to happen even when "net session" command states a session actually exists. I'm getting confused since i should be already logged -_- as an administrator. I'm googling around, i've found other ppl posting on forums they're experiencing the same problem without solutions. I tried to set an ssl cert on windows XP i've on ...Show All
Visual C# What is the maximum literal address for a local file?
I thort it was 255 but when tried I found it only == 248 CHAR full LITERAL filename & path string length!!! How do I determine what the user can enter before submitting it to the OS as the intended filename Well Gabriel and Peter I find myself back to square one! Here's a straightforward catagorical question for you both. How do I translate userDatalength = systemMaxFilename.length-currentFilename.length; Basically I just need the jargon to convert my logical idea into GeekSpeak! A sad lacking in the Visual Studio 2005 Express edition me thinks. ...Show All
Windows Forms Strange DataGridView Exception
I have an application which retrieves information from a SQL database puts it in a DataTable object and then loads it into a DataGridView object. My code exceutes fine and does not raise any exceptions. However when I attempt to step out of the function which loads the DataTable into the DataGridView object a DataGridView Default Error Dialog pops up (In my app not VS 2005) and will continue to pop up repeatedly after hitting OK. The text of the dialog box is: System.ArgumentException: Paramater is not valid. at System.Drawing.Image.FromStream(...) at System.Drawing.ImageConverter.ConvertFrom(...) at System.Windows.Forms.Formatter.FormatObjectInternal(...) at System.Windows.Forms.Formatter.FormatObject(...) at System.Windows.Forms.D ...Show All
Visual Studio What is #IND, #DEN etc.
Hi, Often, if some floating point operations fail, i see values such as -1.#IND000000000000000000000 and 3.4353453453535342#DEN in the Debugger. Does anyone know what exactly this means. I could not find any documentation explaining these special double values (#DEN, #IND etc.). Thanks for help, cheers, Stefan I can't seem to find #DEN but not #IND is floating point NAN (not a number). This page talks a little about it. http://msdn.microsoft.com/library/default.asp url=/library/en-us/vclang98/html/sample_Members_of_the_numeric_limits_Class_(STL_Sample).asp ...Show All
Visual C++ fseek function in CFile of vc++
Hi everybody, please help me to solve this problem... my vc++ coding is, try { CFile cfile_object("D:\\IW-Workspace\\yogi\\file1.pmd",CFile::modeRead); int r=cfile_object.Seek(0,CFile::end); char szSampleText[100]; UINT lBytesRead = cfile_object.Read(szSampleText,100); AfxMessageBox(szSampleText); CFile object; object.Open( "D:\\IW-Workspace\\yogi\\filenew1.excel",CFile::modeCreate|CFile::modeReadWrite); object.Write (szSampleText,100); } catch(CFileException e) { AfxMessageBox("error"); } i need to pass the no of bytes of the file in that character array... but i dont know how.. pls help me... Hi, when i use GetLength function the file which i write ...Show All
Visual Studio Team System Customising WorkItem & Work Flow
Hi All, I am trying to customise Work Item Template. This Customisation also include definning workflow. i am not clear about this work flow what is the relation between WorkItem customisation & workflow. Any inputs with good practicle example will be highly appreciated. Thanks. Work Flow is used to define the behaviors of your fields when the item in different state or transition. You clould want some filed is readonly or required when the item in Active state. Or you don't want a bug can be modified from Active to Closed directly. All these things can be implemented in WorkFlow. BTW: The customization tool PTE (Version 0.9.2346.34929) has a severy bug when you define WorkFlow. Memory Leak!! ...Show All
Software Development for Windows Vista USB Video (UVC) extension unit
I am having difficulty accessing UVC extension units using DirectShow IKsControl::KsProperty. When I try doing KSPROPERTY_TYPE_GET | KSPROPERTY_TYPE_TOPOLOGY on PropertyId 0, I get back the extension unit GUID and six additional bytes (1,1,3,2,1,0,6) which do not seem to be defined in the DDK. PropertyId 1 returns error 0x80070490. Any suggestions The data for KSPROPERTY_EXTENSION_UNIT_INFO (PropertyId = 0) is copied over from the device's extension unit descriptor which is cached during device startup. During startup, the driver issues a number of control requests to the device like GET_INFO, GET_LEN, GET_MIN and GET_MAX. The value returned by GET_INFO tells the driver which of GET and SET requests are v ...Show All
SQL Server Migrating SQL 2000 to a new sever
I am upgrading our SQL 2000 Server hardware. I am looking for a way to "mirror" this server. The only items that we are changing are updating the hardware and the OS will be Server 2K3 instead of Server 2k Does anyone have a reliable method, or suggested processes for migrating one server to another Best way of doing this is to backup your system databases and restore them on the win2003 server. Check out a paper called "Move your Master" from www.SQLServerCentral.com When you successfully have moved your master you can backup and restore all the databases on the new server. If you have a large amount of databases detach from hostserver - attach on targetserver. Users should ...Show All
