Software Development Network Logo
  • SharePoint Products
  • .NET Development
  • Visual Basic
  • Visual FoxPro
  • Microsoft ISV
  • Windows Vista
  • Smart Devicet
  • Game Technologies
  • Visual C++
  • Visual Studio
  • SQL Server
  • Audio and Video
  • IE Development
  • VS Team System
  • Windows Forms

Software Development Network >> Guard's Q&A profile

Guard

Member List

OsoPolar
papadi
AVVIT
tasawer abbas
Brandon Tucker
c_shah
howard dierking - MSFT
Roman Benko.
Magnus Sthlm
ChasAA
Moorstream
The MaiN MaN
Loopsludge
Esprit
Nir Kovalio
Lameck
Bery
Lolka
Nilton Pinheiro - MVP
Arty Arochita
Only Title

Guard's Q&A profile

  • Visual Basic wininet API - date and time not correct

    Using functions available in the wininet API, I get the files in a directory from a remote unix server with their timestamps. I use FileTimetoLocalTime first to convert the UTC time to local time and then use FileTimeToSystemTime to get the system time - as suggested by the article in MSDN. But the lastwritetime obtained thus is always 8 hours off of the real time and the creationtime and lastaccesstime are always 12:00:00. Also for very old files, the date also is off by 1 day. Why is this Am I missing something or is the code to get the system time is wrong Please let me know. Thanks! Here is the code snippet Private Function ConvertToDate(dtGivenDate As FILETIME) As Date Dim dtDateinSYSTIME As SYSTEMTIME Dim dtDateLocal As FILE ...Show All

  • Visual Basic VisualBasic.Collection vs VBA.Collection

    Hi. I have ported a good chunk of my project from VB6 to VB2005. There is a VB6 COM DLL that I will not be porting over any time soon. I have a custom list class with an Add method that accepts a Collection (of strings). The list class can accept data from the COM DLL as well as Collections created within the project. Example; Dim Col as Collection Set Col = New Collection Col.Add("String1") Col.Add("String2") Call MyList.Add(Col) As well; Dim Col as Collection Set Col = DBEngine.GetListFromDatabase '//Where DBEngine is the COM DLL Call MyList.Add(Col) The problem though, is that now, under VB2k5, COM DLL's return a VBA.Collection Type, and the normal collection type is VisualBa ...Show All

  • Smart Device Development problem - DeviceIoControl

    Hi , I am tyring to retrieve the names of the adapters using IOCTL_NDIS_GET_ADAPTER_NAMES CE-specific NDIS DeviceIoControl request. This is the piece of code i am using to retrive adapter names. PIP_ADAPTER_INFO pAdapterInfo; BOOLEAN bRc; ULONG bytesReturned, nBufferLength; PWSTR pszAdapterName ; HANDLE m_hFileHandle = CreateFile(_T("NDS0:"), 0, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, (HANDLE) INVALID_HANDLE_VALUE); if( m_hFileHandle == INVALID_HANDLE_VALUE ) { printf("Could not open file (error %d)\n", GetLastError()); return 0; } // Get list of adapter names bRc = DeviceIoControl(m_hFileHandle, IOCTL_NDIS_GET_ADAPTER_BINDINGS, ...Show All

  • SQL Server Is this considered scale-out?

    I picked back up an effort to get our reporting services DR scenario in place and am having some issues. Our corporate approach for production databases is to back-up the database to the local server disk, copy the back-up files to a remote office and restore the databases on remote DR servers. This process is scripted to run overnight so in the case of failure of the production environment we lose at most one day of work. Now, I would like to set up a parallel scenario for Reporting Services and started with reading a bit of documentation. I read "Moving a Report Server Database to Another Computer" and "Backing Up and Restoring Encryption Keys" and then set to work. I have two instances of SQL Server 2005 Standa ...Show All

  • Windows Forms MonthCalendar event not firing after losing focus

    I have a dynamically created MonthCalendar control inside of a Menu.  When I first expand the menu, and the calendar control is revealed, I can click on the dates inside of the calendar and the event handler fires.  However, as soon as I close the menu, and come back again, the event handler no longer is getting called when I make a new date selection. Also, the same behavior when using a DateTimePicker, as is with the MonthCalendar. MonthCalendar cal1 = new MonthCalendar (); cal1.DateSelected += new DateRangeEventHandler (cal1_DateSelected); void cal1_DateSelected( object sender, DateRangeEventArgs e) { try { MonthCalendar cal1 = ( MonthCalendar )sender; if (cal1 != null ) { / ...Show All

  • Visual C++ Project : error PRJ0002 : Error result -1073741511 returned from 'D:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'.

    Hi, VC++ Express was working for me fine for three days, after that it throwed the following error fatal error C1902: Program database manager mismatch; please check your installation then i tried reinstalling now i am getting a different error Project : error PRJ0002 : Error result -1073741511 returned from 'D:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'. I tried the service packs too but no use... can anyone pls help me. build log with this Build Log Build started: Project: APL, Configuration: Debug_JP|Win32 Command Lines Creating temporary file "d:\09.13.01_APL\apl\Debug_JP\RSP00000218364064.rsp" with contents [ /Od /I "." /I "../build" ...Show All

  • Gadgets saveAs dialog

    Hi again, seeing that the documentation is still not updated, how it is with the save file as dialog I've discovered that I have to separate the file types by \0 instead of :. I wonder if I can leave the code with this null char or if this would be unexpectly fixed And how should I use the first parameter Is there any way how to suggest the file name for user Hi,  Thank you for adding that to the known bugs list. ;-)  Well, actually.. they have two options. Update the documentation, or, if they add a function to replace ':' with \0 they won't break the compatibility if there are already \0s in the string - good enough, isn't it :) I can't imagine why the have added yet another ...Show All

  • Community Chat Virtual Intelligence, AI

    People we need to talk about this. When people talk about this, they say its based on storing and retriving information. The learning process for the computer would be to save as much information as possible from its interactions with the environment. But when I think about this, I feel its a restriction to learning. Consider this, when we are small adding two numbers 2 and 3, would be done on fingers or on a peace of paper. But when we grow up we dont use the fingers or paper. So my point is: The input(add 2 and 3) remains the same, also the output(5) remains the same. So where did the process of learning go. Thus, I would suggest that a machine should not only learn and save in information, it should also learn to proce ...Show All

  • .NET Development Calling Remote Stored Procedure in C#

    I am trying to call a remote stored procdure in c# but am receiving the following error message in my ASP.NET application when trying to call the appropriate method: System.InvalidOperationException: Internal connection fatal error. Calls to local stored procedures on the SQL server the ASP.NET application is connected to are run fine. I have logged into the SQL server using the same user as the ASP.NET application and called the remote proc manually (using EXEC [SQL Server Ip Address].databasename.dbo.storedprocedurename) and it works fine I am using the followinng code to call the remote proc: SqlConnection cnDefault = new SqlConnection ( this .DbConnectString); SqlCommand cmdCommand = new SqlCommand ( " ...Show All

  • Visual FoxPro can VFP9 take data type jpg, gif, or PDF ?

    You shouldn't expect others to write your code. ANyway here is a sample that you might expand yourself: Public oForm oForm = Createobject('form1') oForm.Show() Define Class form1 As Form Top = 0 Left = 0 Height = 470 Width = 740 DoCreate = .T. Caption = "HTML sample" Name = "Form1" HTMLFile='' && Custom prpoperty to hold temp .htm name * This is IE control - you'd use webbrowser4 from gallery instead * just because it already has some checks, extra pem. ie: wouldn't need readystate part * for the sake of keeping code short here I directly use olecontrol itself Add Object htmlviewer As OleControl With ; Top = 12, ; Left = 12, ; Height = 396, ; Width = 708, ; Visible = .T., ; Name ...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 You could define a constant MAX_PATH and set it to 260 then you subtract the current length of the filename to get the number of characters left. It is possible that the MAX_PATH is set 256 in Windows 95, 98 and Windows Me (not sure though) but as mentioned here before you cannot create files using the Base Class Library that exceed 260 characters and a maximum of 248 characters for a folder name. ...Show All

  • Visual Basic change label text

    in my application i have 2 different forms 1 form a datagrid view control is present with 5 different colums and some data inside the grid from sqlserver database 2 form five 5 different lables and a datanavigator control and my requirement is to when ever the data navigator control is navigated the lables in the form should change their text according to the colum text present in the datagrid view of the first form can any one help me how to solve this problem The datagridview is probably bound to a datasource. If so then use a bindingsource control and just bind the labels to the same datasource. The bindingsource control will ensure that when you change in the datagridview the current record in the binding ...Show All

  • Windows Live Developer Forums MSN 8 adm template

    Has microsoft come out with an adm template for Active Directory Colin127: This forum is for questions and discussions related to Windows Live Development. For questions or problems related to Active Directory, try the resources and communities mentioned on Microsoft TechNet site: http://technet.microsoft.com/en-us/default.aspx ...Show All

  • Visual C# Check if string contains valid year

    How do I check if a string contains a valid year only... I've the classic way but it seems it works only with complete dates. Here's what I tried: string MyString = "2001"; DateTime MyDateTime = DateTime.Parse(MyString); Console.WriteLine(MyDateTime); This code snippet throws an exception ! Any help would be appreciated. My Version: string MyString=" 1776 "; Console.WriteLine(DateTime.ParseExact(MyString," yyyy ", CultureInfo.CurrentCulture)); ...Show All

  • Game Technologies: DirectX, XNA, XACT, etc. Somebody make a tutorial for dumbies?

    Im making my first ever game, and my first EVER use of code, and i tried the Begginers tutorial for your first game, but it seems to assume you know about code by skipping details. Can someone tell me the section that deals with putting an image IN your game and go through it with every detail PLEASE. /// <summary> /// Load your graphics content. If loadAllContent is true, you should /// load content from both ResourceManagementMode pools. Otherwise, just /// load ResourceManagementMode.Manual content. /// </summary> /// <param name="loadAllContent">Which type of content to load.</param> /// this is a texture we can render Texture2D myTexture; //coordinates to draw ...Show All

©2008 Software Development Network