User Profile

Collapse

Profile Sidebar

Collapse
zman77
zman77
Last Activity: Jun 3 '09, 08:59 PM
Joined: Sep 11 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • zman77
    started a topic Entity Data Model and stored procedures

    Entity Data Model and stored procedures

    Hi.
    My solution (working in VS 2008) has a C# console app, and a C# web service. The service has an entity data model. It has numerous stored procedures. For one of the stored procs, which just returns data (SELECT blah blah FROM...), I added a function import called "Iservice." I saved all, then in my console app, updated the service reference to my C# service. Now, in my console app, I am trying to do the following:
    ...
    See more | Go to post

  • Too many characters in character literal - what does it mean, and how to fix?

    Hello,

    I have a bunch of Image Buttons in my code. When I leave them as they are, I can build my project without problems. However, when I add OnClick to an image button, I get the error:
    Too many characters in character literal

    For example, the following builds with no problems:
    Code:
    <asp:imagebutton id="myImgBtn" style="Z-INDEX: 102; LEFT: 82px; POSITION: absolute; TOP: 8px"
    ...
    See more | Go to post

  • zman77
    started a topic C#, windows service, can't write to file
    in .NET

    C#, windows service, can't write to file

    Hi.
    I have a windows service that I wrote in C#. After I successfully compile it, I install it using InstallUtil, then run it with the net start command. I am trying to either log some stuff to a file, or to the Event Viewer in windows. Nothing has worked for me so far.
    I am looking for help.
    This is the relevant code:

    Code:
        public partial class Service1 : ServiceBase
        {
            private
    ...
    See more | Go to post

  • C#, asp website: problem with of HttpRequest.QueryString ("+" char decoded to space)

    I have a problem with HttpRequest.Que ryString.

    There is an XML string that contains something like the following: <age>8+</age>
    As you probably guessed, the "+" is the problem :)
    I want to get that XML string from QueryString, however, the "+" appears as a " " (space), not a "+".

    I have tried the following:

    Code:
    NameValueCollection coll = Request.QueryString;
    ...
    See more | Go to post

  • struct containing array of pointers to struct (C dll to C#)

    Hi.
    In C dll, there is a struct that contains an array of struct pointers. I do not know how to represent that in C#. That's my problem.

    Here is the relevant C code:

    [PHP]struct vector
    {
    uint elem_count;
    uint size;
    int (*cmp)(const void *, const void *);
    void *table;
    };

    typedef struct vector VECTOR;

    #define CTABLE VECTOR
    #define...
    See more | Go to post

  • C struct in dll -- > equivalent C# struct to send to dll?

    Hi. I've managed to get the C code I need into a dll, and my C# program can access some functions. There are other functions though, and I don't know how to access them from C# because they involve a struct declared in the C code. The example I have been working from is the following:

    C-struct:
    [PHP]struct STRUCT_DLL
    {
    int count_int;
    int* ints;
    };[/PHP]

    C# code:
    [PHP]class...
    See more | Go to post

  • Wow, thank you. That was dumb of me.



    Well, I don't know what format is a COM dll. I could have included DllImports wherever I needed to use the certain function from the dll, but I thought it would look "cleaner" if I just put all the imports in one file. That and I wanted to try it. At any rate, I guess this is solved (thank you), and now I'm going to see what happens when I have to send in and return...
    See more | Go to post

    Leave a comment:


  • Ok I guess starting with the example I did, and the one you linked me to, I can't create a wrapper class.

    This is my code:

    ztest.c:
    [PHP]#if defined(WIN32)
    # define DLL_EXPORT __declspec(dlle xport)
    #else
    # define DLL_EXPORT /**/
    #endif

    #include <stdio.h>
    #include <string.h>

    DLL_EXPORT void dll_fct (char *par)
    {
    printf("executi ng...
    See more | Go to post
    Last edited by zman77; Nov 14 '07, 07:35 PM. Reason: names, replies

    Leave a comment:


  • I just found out about MinGW and have been using that. I can make dll files from C code. However, when I use them in my C# code, compile, and then run the executable, it hangs. I've followed a bunch of tutorials (most recently, this one: http://www.adp-gmbh.ch/win/misc/mingw/dll.html ), but they all give the same result - C# executable hangs. If I use the dlls in C code, the C executable runs fine.

    What am I missing here?
    See more | Go to post

    Leave a comment:


  • zman77
    started a topic making a .dll file with gcc to use in C# (MSVS)
    in .NET

    making a .dll file with gcc to use in C# (MSVS)

    Hi.
    How do I use gcc to compile C code into a .dll file that can be used by my C# project?

    The problem I am faced with is this: I have C code compiled with gcc. I tried making a new C++ project in visual studio (so that I can create a dll) and just copying the C code, but language extensions and void pointers prevented me from compiling. I tried compiling as C code and turning off Microsoft Language Extensions in my project...
    See more | Go to post

  • zman77
    replied to porting C code (unix) to a C++ prject (MSVS)
    in C
    Disabling Microsoft Language Extensions worked (got rid of the error I described), but there are some other errors. I am assuming they are appearing for similar reasons.

    Trying to compile with -pedantic with gcc resulted in warnings given (warning: pointer of type `void *' used in arithmetic) on the same lines, but not errors.

    Thank you both for your help! Even though I still can't compile, at least I learned something,...
    See more | Go to post

    Leave a comment:


  • zman77
    replied to porting C code (unix) to a C++ prject (MSVS)
    in C
    Thank you for the replies.

    Here is where table is defined:
    Code:
    struct vector
    {
    	UINT    elem_count;      /* number of items in the vector */
    	UINT    size;            /* size of the vector */
    	UINT    elem_size;       /* element size */
    	int     (*cmp)(const void *, const void *);
    	void    *table;
    };
    If you can't do pointer arthimetic because void is of indeterminate...
    See more | Go to post

    Leave a comment:


  • zman77
    started a topic porting C code (unix) to a C++ prject (MSVS)
    in C

    porting C code (unix) to a C++ prject (MSVS)

    Hi.
    I have a project (multiple header and source files) that was written in C, in unix. I made a new C++ project in MSVS 2005 (blank project), and am trying to simply copy the C code to my new C++ project. I thought the main problem I'd face would be finding the equivalent libraries for windows, however, I ran into another issue.
    I get the following error:

    error C2036: 'void *' : unknown size

    The line...
    See more | Go to post

  • zman77
    replied to C# debugging help
    in .NET
    Thank you.
    Looks like I've found the problem.
    See more | Go to post

    Leave a comment:


  • zman77
    started a topic C# debugging help
    in .NET

    C# debugging help

    Hi. I apologize in advance if this is in the wrong forum.
    I am totally new to debugging my code, and the tools available. Previously, all I did was manually trace my code. However, doing that with my current problem would take way too long.

    I have an object (obj A) with an attribute. I check the value of the attribute, before I add the object "into" another object (obj B). The value is correct (expected). Then...
    See more | Go to post

  • zman77
    started a topic C# application using C code?
    in .NET

    C# application using C code?

    Hello.
    I have an application, that I designed in C#.
    I need to be able to use some libraries that were made in basic C. Dll files are not an option. So, without putting any C code into dlls, can my C# app access the C code? Or is my only option copying the C code, and changing it to C#?
    Thanks for any help or guidance.
    See more | Go to post

  • C#: value of one object's private variable affects another object (but it shouldn't)

    EDIT: -- forgot to mention... I am using Visual Studio 2005, on Win XP, on an intel machine

    Hi.
    This is my first post, though I've "lurked" for a while because I find these forums very helpful.

    Ok my problem is the following. I have a class that contains a "MakeByteAr ray" function.
    I have many objects of that class. Inside that function, I have a private variable,
    that is...
    See more | Go to post
    Last edited by zman77; Sep 11 '07, 02:25 AM. Reason: added system info
No activity results to display
Show More
Working...