Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

maizhiming

@maizhiming
About
Posts
7
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • strerror() for WSAGetLastError() and GetLastError() [modified]
    M maizhiming

    Are there any functions that when given an error number returned from WSAGetLastError() and GetLastError() will return a char * to a descriptive string for that error. I am using unmanaged C++. This is what I would like to be able to do: cout << strerror(WSAGetLastError()) << endl; -- modified at 16:57 Monday 11th June, 2007

    C / C++ / MFC c++ help

  • converting from const char [] to 'LPWSTR'
    M maizhiming

    When I compile this code in MSVC++ 2005 express I get the following error. SERVICE_TABLE_ENTRY DispatchTable[]= {{"Service1",serviceMain},{NULL,NULL}}; error C2440: 'initializing' : cannot convert from 'const char [9]' to 'LPWSTR' Pretty much where ever I am using a string I get the same error. Why doesn't the code work?

    C / C++ / MFC c++ help question

  • Access Denied error [modified]
    M maizhiming

    Here is the code that I am using. I am referencing the file in the last sub-routine "Save_Click".

    Sub SaveNodes(ByVal nodesCollection As TreeNodeCollection, ByVal textWriter As System.Xml.XmlTextWriter)
    Dim link_node As TreeNode
    For Each link_node In nodesCollection
    If link_node.ChildNodes.Count Then
    textWriter.WriteStartElement("Folder")
    textWriter.WriteAttributeString("Name", link_node.Text)
    textWriter.WriteRaw(vbCrLf)
    Else
    textWriter.WriteStartElement("Link")
    textWriter.WriteAttributeString("Name", link_node.Text)
    textWriter.WriteAttributeString("Location", link_node.NavigateUrl)
    End If

         If link\_node.ChildNodes.Count > 0 Then
            SaveNodes(link\_node.ChildNodes, textWriter)
         End If
         textWriter.WriteEndElement()
         textWriter.WriteRaw(vbCrLf)
      Next
    

    End Sub

    Sub SaveTreeViewData(ByVal treeView As TreeView, ByVal path As String)
    'Create a serializer and file to save TreeViewData
    Dim TextWriter As New System.Xml.XmlTextWriter(path, System.Text.Encoding.UTF8)

      TextWriter.WriteStartDocument()
      TextWriter.WriteRaw(vbCrLf)
    
      SaveNodes(treeView.Nodes, TextWriter)
    
      TextWriter.Close()
    

    End Sub

    Protected Sub Save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Save.Click
    SaveTreeViewData(Link_Tree, "favorites.xml")
    End Sub

    ASP.NET asp-net sysadmin csharp windows-admin hosting

  • Access Denied error [modified]
    M maizhiming

    I am relatively new to ASP.NET and have just uploaded my first page. I have a "Save" function that writes information from a control to an XML file. Whenever I try to run this function I get this error from ASP.NET: Server Error in '/' Application. -------------------------------------------------------------------------------- Access to the path 'c:\windows\system32\inetsrv\favorites.xml' is denied. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.UnauthorizedAccessException: Access to the path 'c:\windows\system32\inetsrv\favorites.xml' is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access. -------------------------------------------------------------------------------------- I'm not sure how to change the access rights because I am using a web hosting service. It works fine on my local machine. What should I do from here?

    ASP.NET asp-net sysadmin csharp windows-admin hosting

  • TreeView SelectedNodeChanged [modified]
    M maizhiming

    That was the problem. Thanks for the tip.

    ASP.NET c++ help question csharp

  • TreeView SelectedNodeChanged [modified]
    M maizhiming

    I have a regular ASP.NET TreeView control on my page that is auto populated from an XML file using DataBindings. In the SelectedNodeChanged event handler routine, I have it make the text of the selected (clicked) node bold. My problem is: It doesn't matter which node I click on, it always bolds the top most node in that level of the tree. It never bolds the node I selected unless it is the top most node of a level. It appears as if the page is doing a postback to the server (as it should). But I am not sure if that is the issue. How do I make it so that the node I click on stays "clicked". Here is what I am talking about: If this is my tree (below) and I click on "VBScript" it bolds "XML" when it should actually bold "VBScript".

    Main
    XML
    XHTML
    Visual C++
    Visual Basic
    VBScript
    UML

    PS. Is there a way to implement a control-click event for the TreeView control? -- modified at 18:59 Wednesday 21st June, 2006

    ASP.NET c++ help question csharp

  • Advantages of MFC
    M maizhiming

    I am an avid Visual Basic programmer and I would like to know what the advantages of using Visual C++/MFC are over Visual Basic. For what kinds of scenarios can you not use Visual Basic?

    C / C++ / MFC c++ question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups