Rhubarb's Q&A profile
Visual Basic DeviceIOControl and SCSI_PASS_THROUGH_DIRECT
Hi, I'm trying to get data from a SCSI Inquiry command in VB. I'm using DeviceIOControl with SCSI_PASS_THROUGH_DIRECT - the call goes through OK and DeviceIOControl returns 0, but I can't seem to get the expected data back - retBytes just contains 7 bytes of seemingly (but probably not) random data: (40, 4, 20, 0 , 40, 4, 20). Changing scsi.dataIn to 0 gets me 255 bytes of data, but not the data I should be getting. Any help would be greatly appreciated. Here's what I'm doing. offset as Byte is ignored for now, and fileHandle is a valid handle to \\.\F:. Private Function getVPDPage(ByVal offset As Byte, ByVal fileHandle As Long) As Byte() Dim status As Long Dim dIn As IntPtr = Marshal.AllocHGlobal(255) Dim dOut As IntPtr = Ma ...Show All
Visual C++ sort of CListCtrl
Hi. For example, for(i=0; i<n; i++) { ... XXX.InsertItem(0, A); // CListCtrl XXXClass::XXX XXX.SetItemText(0, 1, B); XXX.SetItemText(0, 2, C); XXX.SetItemText(0, 3, D); ... } I could get the result of list, but it's reversed, i.e. last-in first-out. I want like this: A B C D i=0 i=1 i=2 ... What's wrong Sorry for this simple matter... Thanks a lot, Prasad. I got it! I've got a more question. In order to append some items to that list in another function, how to do ...Show All
SQL Server System Stored Procedures do not execute
I tried this morning to check some of the system stored procedures and ran into trouble. Only four of them executed: sp_alterdiagram , sp_creatediagram , sp_dropdiagram and sp_helpdiagramdefinition . I could not check all the rest, I did it selectively. The typical error message was: Invalid object on RETURN statement. Some had syntactical errors. sp_ActiveDirectory_Obj Invalid object name 'sys.sp_ActiveDirectory_SCP' Line 171 sp_ActiveDirectory_SCP Invalid object name 'sys.sp_ActiveDirectory_SCP' Line 171 sp_ActiveDirectory_Start Invalid object name 'sys.sp_ActiveDirectory_Start' Line 19 Invalid object name 'sys.sp_add_agent_parameter' Line 60 Invalid object name 'sys.sp_add_agent_profile' Line 123 Invalid object name 'sys ...Show All
SQL Server Maintenance Plan Question
Hi There I am not sure which forum would eb the right place for a Maintenance plan question, so i am just posting it here. I have noticed that the maintenance plans i have created are not dynamic, by that i mean that for each step, integrity check, backup etc, i have always selected the option all user databases. However it seems that when new user databases are created these are not part of the maintenance plan. Is this correct, do i have to create a new maintenance plan or go back and reconfigure the exisiting one evertime a new user database is created Or am i mising something here P.S i gatehr this from looking at the TSQL from the Maintenance plan afetr creating new databases i see the TSQL still only references the databa ...Show All
SQL Server get records after executing a stored procedure
Hi All, I have a Execute SQL Task I get some values from a table onto three variables. Next step in a DFT, I try to execute a stored proc by passing these variables as parameters. EXEC [dbo].[ETLloadGROUPS] @countRun = , @startTime = , @endTime = This is the syntax i use, in the parameters tab of the DFT I ensured that all the parameters are correctly mapped. When I run the package, it executes successfully but no rows are fectched. I tried running the stored proc manually in the database, and it seems to work fine. Am I missing something here Please Advice Thanks in Advance Hi Jeff, My whole idea is to query a table, get three values onto three variables, pass these values to ...Show All
Visual C# Same KEY & IV for TripleDES Encryption as well as Decryption in 2 different Win Services.
Hi, I want to encrypt as well as decrypt a file using TripleDES. My problem is that I am autogenerating the KEY & IV while encrypting the files. As per my project requirement, I have to keep both Encryption & Decryption parts in two differents windows services. Can any one please guide me how to supply same KEY & IV for both I am using the following coding for encryption & decryption: //.......................... private static void EncryptData(String inName, String outName, byte [] tdesKey, byte [] tdesIV) { //Create the file streams to handle the input and output files. FileStream fin = new FileStream(inName, FileMode.Open, FileAccess.Read); FileStream fout = new FileStream(outName, ...Show All
Windows Forms Where can i get the issuevision's c# code??
need help...looking for the c# source of issuevision Hi, http://www.windowsforms.net/Applications/application.aspx PageID=40&tabindex=8 Here it is! ...Show All
SQL Server how to convert this into stored procedure?
I have the following coe to populate combobox with data from different tables and I want to know how to convert it into stored procedure private void populate_drop_down() { try { //ensure the box is cleared cboIDType.Items.Clear(); cboNationality.Items.Clear(); cboCountry.Items.Clear(); cboGender.Items.Clear(); cboMaritalStatus.Items.Clear(); cboBloodGroup.Items.Clear(); cboProfession.Items.Clear(); cboCompany.Items.Clear(); cboBloodGroup.Items.Add( "" ); cboProfession.Items.Add( "" ); cboCompany.Items.Add( "" ); //Use the SQLServer provider.. //set up the connection and the command... // sql_connection = new SqlConnection("server=J ...Show All
Gadgets XMLHttpRequest not behaving itself in gadgets
I have encountered some slightly strange behaviour, and I'm wondering if it is related to the fact it is in a gadget, or if it is for some other reason. Basically I have an XML HttpRequest object created as follows: var xmlHttpRequestObject = null; ... xmlHttpRequestObject = GetXMLHTTP(); // function to create object xmlHttpRequestObject.onreadystatechange = getData; xmlHttpRequestObject.open( "get" , "http://www.myurl.com./myfile. xml" , false ); xmlHttpRequestObject.send(); and the call back function as follows: function getData() { if (xmlHttpRequestObject.readyState == 4) { if (xmlHttpRequestObject.status == 200) { xmlData = xmlHttpRequestObject .responseXML; ...Show All
Software Development for Windows Vista Graph Works in GraphEdit but not in Code
I wrote a DVD player application and built the graph manually (didn't use DVDGraphBuilder and its auto graph building feature, just a normal GraphBuilder with manually connected filters). I added the graph created at runtime to the ROT (Runtime Object Table) and then did "Connect to Remote Graph" in graph edit, thereby loading the graph from my code into graph edit. If I play this graph in graph edit, it works perfectly. But in my program the first screen shows up for about 1 second and then it goes white and then the dvd plays with no video, only audio (with the ActiveMovie window continually filled a white screen). I can't figure out why the graph will not keep on rendering the video when running the code, since the exact same graph (sam ...Show All
SharePoint Products and Technologies Adding "Person Column" to a list
I may be barking up the wrong tree but thought I would throw it out there. Using MOSS and the BDC, we have the capability to add Business Data as columns in a list. How would I go about creating a "People" type in my BDC that pulls the data from the user profiles in MOSS What I would like to do is have a drop down or search screen for selecting a person from the profile store instead of keying the information into a contact list and then having the information be out of date , etc... It would be much easier to just allow them to select a person and pull the data from there. They would also get the "Presense" pawn next the persons name etc.. which would be very useful. Does this sound possible Has anyone done th ...Show All
SQL Server CASE When Then returns unexpected result
My View needs to return a field called Process_Failure based on a number of conditions related to: TED.Duration, PU1.PU_Desc, TEF.TEFault_Name, ER1.Event_Reason_Name TED.Duration = 720 PU1.PU_Desc = 'MHFN-300-004-030: Stretch Wrapper 4' TEF.TEFault_Name = 'Stretch Wrapper Mtr OL' ER1.Event_Reason_Name = NULL Returns a value of 0, and I don't understand why. Any help would be most appreciated. From my View: CASE WHEN TED.Duration < 10 THEN 0 WHEN TED.Duration > 10 AND PU1.PU_Desc like 'Sch%' THEN 0 WHEN TED.Duration > 10 AND rtrim(ltrim(PU1.PU_Desc)) like '%Speed' THEN 0 WHEN TED.Duration > 10 AND rtrim(ltrim(PU1.PU_Desc)) like '%Tracking' THEN 0 WHEN TED.Duration > 10 AND rtrim ...Show All
Smart Device Development Scanning SDK in Compact Framework Issue
Hi all, I have found an issue with the Imaging/Scanning SDK that the Compact Framework uses and would like to report this issue with Microsoft. How exactly do I go about do this Thanks Tryst The issue is that when I make use of the Symbol scanning (or imaging) API on the MC50 device in my application, and the device memory goes lower than around 7.50 MB (its got the memory slider indicating free program and storage memory on the MC50) I get a SCAN_ENABLE exception. When I get this, it means the scanner is screwed (disabled) until a soft-reset is performed on the device. I guess it doesn't free up all the resources when gets the first error. Symbol have told me that its the compact framework issue (what ever they use for the imager/s ...Show All
Visual C# Problem with System.Web.Mail
Hello Everyone, I am trying to write code in my c# windows program to send email. I found good tutorials online to get this done. Most of which use the System.Web.Mail namespace. When I come to write that in: using System.Web.Mail; I get this error: The type or namespace name 'Mail' does not exist in the class or namespace 'System.Web' (are you missing an assembly reference ) I even tried: using System.Web.Util;............but I pretty much got the same error message. When I come to look System.Web.Mail in the help files, I find it there, I just can not use it. Can someone please help me by pointing out what is wrong. I am using visual studio 2003 c# on windows xp home edition. ...Show All
Audio and Video Development Need some code samples (Fast Forward, Rew and other)
Please, I need samples of JavaScript code (some strings) and some comments for following operations: Fast Forward Rew Go To Next Chapter Go To Previous Chapter P.S. I tried to use Player.playlist.fastForward(4); and seen JS error (iHDScript API fastForward: HDDVD_E_ARGUMENT) on this string. Why is "4" incorrect argument I think that 4 is: (normal speed) * 4. I mistaken For Player.playlist.stepForward(); I see following error: iHDScript API stepForward: HDDVD_E_NOTSUPPORTED P.P.S. Sorry, I known that my question is RTFM but I don't have specefication. :( thanks closer. I am not sure of code . you try that pls 1) As per spec, speed::=[0-9]+("."[0-9] ...Show All
