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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
Y

yyf

@yyf
About
Posts
84
Topics
58
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • MAPILogon with Groupwise
    Y yyf

    nobody knows? :(

    C / C++ / MFC help question

  • MAPILogon with Groupwise
    Y yyf

    Hi, I am writing a dll exporting an funcion to send email. Now I got a problem. When my dll was called by another application, the groupwise login dialog will show up, when I click 'Cancel', that login dialog will be gone. However, when my dll was called again, this login dialog won't show up anymore and MAPILogon return SUCCESS_SUCCESS, lhSession is not null. I don't know what's wrong. Can any one tell? Thanks in advance.

    C / C++ / MFC help question

  • Problem with oracle session
    Y yyf

    Hi, I connect to an oracle database using OleDbConnection and run quite a number of queries. In the connection string I use everything default, that means the min pool size is 0, max pool size is 100 etc. I don't keep any connection open, as soon as I finish one query I will close the connection and do something else. Also, this is not a multi-thread program. The problem I have now is that I found my program will create more than one sessions in Oracle, the highest number of sessions I found so far is 24, the lowest is 2. I don't know why. Can anyone explain it a little bit and tell me what is the relationship with connection, connection pooling and the actual session in database? Thanks in advance.

    Database database question oracle help

  • ref Array
    Y yyf

    Here is what I did: object []a = new object[1]; object []b; Array tmp = (Array)a; b = (object [])func(ref tmp); Then it compiled ok. But when I run it, I got this exception: An unhandled exception of type 'System.Runtime.InteropServices.SafeArrayTypeMismatchException' occurred in GeoCoding.exe Additional information: Specified array was not of the expected type. Thanks.

    C# question csharp com data-structures

  • What is the simple way to use a C# dll in VC++
    Y yyf

    Hi, I want to access the methods in a C# dll. How can I use it in Visual C++ 6.0? It's a simple dll. I don't want COM stuff get invoke. Because I am not familar with COM and I don't want to be bothered with registry stuff. Any idea? Thanks in Advance.

    C# question c++ csharp com windows-admin

  • ODP.NET & MSDAORA
    Y yyf

    Hi, I found this note from the download page of ODP.Net - Do not install ODP.NET over a previous Oracle Home version (e.g. Oracle8i) if you have applications dependent on the older Oracle Home and are not certified with an Oracle9i Release 2 Home. For example, the Microsoft OLE DB provider for Oracle (MSDAORA) may not work with Oracle9i Release 2 client because the provider has not been tested for it. According to it, my understanding is: (1) ODP.NET only work with oracle client of Oracle9i Release 2 or high version (2) if there's an application using oracle8i client and connect to oracle by odbc, then it's not recommended to install oracle 9i client and ODP.Net on it (3) if there's an application using oracle9i client and connect to oracle by odbc, then it's ok to install odp.net and my .net application on it Correct me if I am wrong. Thanks in advance.

    Database announcement csharp database oracle com

  • Form's Position changed after Show & Hide
    Y yyf

    Thanks.

    C# question

  • Form's Position changed after Show & Hide
    Y yyf

    I found this from msdn about "Form.WindowState Property" Before a form is displayed, the WindowState property is always set to FormWindowState.Normal, regardless of its initial setting. This is reflected in the Height, Left, Top, and Width property settings. If a form is hidden after it has been shown, these properties reflect the previous state until the form is shown again, regardless of any changes made to the WindowState property. I think this is the reason, my form keeps changing position. But How can I keep it stay where it was? Thanks in advance.

    C# question

  • Form's Position changed after Show & Hide
    Y yyf

    Hi, I use form.Hide() to hide a form, and use form.Show() to bring it back. However, I found that the form's position is changed. How did this happen? I didn't recreate this form, just hide and show again. How can I keep it as where it was? Thanks!

    C# question

  • GUID
    Y yyf

    Hi, How can I wrap the GUID type in .Net? Thanks.

    C# question csharp

  • WideChar
    Y yyf

    Hi, How to convert string to WideChars when calling a legacy dll from .Net? Thanks.

    C# csharp tutorial question

  • LPWSTR in C#
    Y yyf

    According to my understanding, the new method is using Unicode all the time. So I wrap it like this now: [DllImport("user.dll", CharSet = CharSet.Unicode)] int LoginDlg ( int lDSType, string lptstrDataSource, int lDSLength, string lpctstrUsername, string lpctstrPassword, ) But why it still doesn't work?

    C# csharp json question announcement

  • LPWSTR in C#
    Y yyf

    This is the API I want to use: long LoginDlg ( long lDSType, **LPTSTR** lptstrDataSource, long lDSLength, **LPCTSTR** lpctstrUsername, **LPCTSTR** lpctstrPassword, ) I wrap it like this: [DllImport("user.dll")] int LoginDlg ( int lDSType, **string**lptstrDataSource, int lDSLength, **string**lpctstrUsername, **string**lpctstrPassword, ) Now I got the new version of this api, the only difference is using LPWSTR instead of LPTSTR long LoginDlg ( long lDSType, **LPWSTR** lptstrDataSource, long lDSLength, **LPCWSTR** lpctstrUsername, **LPCWSTR** lpctstrPassword, ) I use the same wrapper, it doesn't work as usual. Do you have any ideas what's wrong with my wrapper? Thanks in advance.

    C# csharp json question announcement

  • Using String Buffers of Win32 Libraries in C#
    Y yyf

    Hi, everyone For functions in Win32 libraries that will copy a string value into a string buffer, I try to use string. It works. But recently, I read an article about this, it suggests to use StringBuilder instead of string. Because string type is an immutable type in .Net. If using string for string buffer, it could corrupt the temporary buffer created by the marshaler when a string is translated or corrupt the managed heap. But my program works pretty good and I saw some other people's code is doing the same thing as min. Can anyone give me more ideas about this? Thanks in advance.

    C# csharp functional question

  • How to pass null to a ref bool or out bool parameter?
    Y yyf

    Hi, How to pass null to a ref bool or out bool parameter? Thanks.

    C# tutorial question

  • how to wrap some dll functions from VC6
    Y yyf

    How about void *? Thanks.

    C# csharp tutorial question

  • how to wrap some dll functions from VC6
    Y yyf

    Hi, everyone I am using a dll developped in VC6. There are some functions I don't know how to wrap it in C#. 1. one function's parameter use self defined type, type definition is like this: #ifndef LPLONG typedef long far *LPLONG; /* 32 bit */ #endif 2. one function's parameter use 'BOOL *' 3. one function's parameter use 'char *' 4. one function's return value use 'char *' 5. one function's parameter use a structure 6. one function's parameter use a structure * How shall I deal with these? Thanks in advance.

    C# csharp tutorial question

  • from VC6 dll
    Y yyf

    Thank you very much! It works prefectly now.

    C# tutorial question

  • from VC6 dll
    Y yyf

    Here is how the function declare in the VC6 dll head file #ifndef LONG typedef long LONG; /* 32 bit */ #endif LONG _stdcall SelectChildProjects ( LONG lProjectId /* i Number of parent project */ ); Here is how I declare the function in my .Net code [DllImport("dcli.dll", EntryPoint="SelectChildProjects")] public static extern long SelectChildProjects(long lProjectId); Thanks.

    C# tutorial question

  • from VC6 dll
    Y yyf

    Hi, everyone 1. When I call a function imported from a VC6 dll, it returns 42949672970 when it is supposed to return -1. Anyone knows why? 2. There's another function in this VC6 dll like this loginDlg(LPCTSTR Name, long NameLength). This function will return the login name by the first parameter, 2nd parameter is tell the function how long the buffer is. How to import and use this kind of functions properly? Thanks in advance.

    C# tutorial 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