Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

c#.net»·¾³ÏÂÌí¼ÓtlbÒýÓÃʧ°Ü£¬Ôõô»ØÊÂ

·¢ÉúÕâÖÖÎÊÌâÖ÷ÒªÊÇûÓн«typelibÐÅϢдµ½×¢²á±í£¬Ö»Òªµ÷ÓÃRegisterTypeLibServerº¯ÊýÔò¿ÉÌí¼ÓÏà¹ØÐÅÏ¢£¬²Î¿¼ÏÂÃæ´úÂë¡£
ÒÔϺ궨ÒåÊÇÎÒΪÁ˼ò»¯com¿Ø¼þ¿ª·¢¶¨ÒåµÄ¡£
//-----------------------------------------------------------------
//EXPORTS
//
//DllGetClassObject       PRIVATE
//DllCanUnloadNow      PRIVATE
//DllRegisterServer        PRIVATE
//DllUnregisterServer     PRIVATE
//-----------------------------------------------------------------
#pragma once
#include <assert.h>
#include <tchar.h>
#include <strsafe.h>
#include <Shlwapi.h>
#include "streams.h"
#include <atlbase.h>
#pragma comment(lib,"winmm.lib")
//Node:If you reference baseclass library,runtime library must use mt or mtd mode,because usually we compile baseclass in mt/mtd mode.
#if defined(DEBUG) || defined(_DEBUG)
#pragma comment(lib,"strmbasd.lib")
#else
#pragma comment(lib,"strmbase.lib")
#endif
#define BEGIN_COM_DECLARE \
extern HMODULE g_hModule = NULL;\
CFactoryTemplate g_Templates[] = \
{
#define END_COM_DECLARE(clsid,version,libraryname) \
};\
const int CLSID_STRING_SIZE = 39 ;\
void CLSIDtoString(const CLSID& clsid, TCHAR* szCLSID, int length)\
{\
 assert(length >= CLSID_STRING_SIZE) ;\
 LPOLESTR wszCLSID = NULL ;\
 HRESULT hr = StringfromCLSID(clsid, &wszCLSID) ;\
 assert(SUCCEEDED(hr)) ;\
 lstrcpy(szCLSID,wszCLSID);\
 CoTaskMemFree(wszCLSID) ;\
}\
LONG DeleteKey(HKEY hKeyParent, const TCHAR* lpszKeyChild)\
{\
 HKEY hKeyChild ;\
 LONG lRes = RegOpenKeyEx(hKeyParent, lpszKeyChild, 0,KEY_ALL_ACCESS, &hKeyChild) ;\
 if (lRes != ERROR_SUCCESS)\
 {\
  return lRes ;\
 }\
 FILETIME time ;\
 TCHAR szBuffer[256] ;\
 DWORD dwSize = 256 ;\
 while (RegEnumKeyEx(hKeyChild, 0, szBuffer, &dwSize, NULL,NULL, NULL, &time) ==


Ïà¹ØÎĵµ£º

C#ÖÐʹÓÃDataTableÏÔʾAccessÊý¾Ý¿âÖÐÎļþÁбí


private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
             this.comboBox2.Items.Clear();
            switch(this.comboBox1.SelectedIndex)
       ......

C#¶ÁдAccessÊý¾Ý¿âµÄOLE¶ÔÏó×Ö¶Î

£¨Ò»£©°ÑÎļþÄÚÈÝдÈëAccessÊý¾Ý¿âµÄOLE¶ÔÏó×Ö¶ÎÖУº
if (File.Exists(txtBrow.Text) != false)   // Îı¾¿òtxtBrowÖÐÄÚÈÝΪÎļþ·¾¶¼°ÎļþÃû
{
     //»ñÈ¡Îļþºó׺
     FileInfo p = new FileInfo(txtBrow.Text.Trim());
     F_str_Type = ......

C#ÖÐ¶Ô XML½Úµã½øÐÐÔö¡¢É¾¡¢¸Ä¡¢²é

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
    /// <summary>
    /// XMLHelper XMLÎĵµ²Ù×÷¹ÜÀíÆ÷
  &nb ......

ArcEngine ͼÀýC#Ô´Âë:

private void MakeLegend(IActiveView activeView,IPageLayout pageLayout)
      {
          //¶¨ÒåͼÀýUID¶ÔÏó
          UID uid = new UIDClass();
      &n ......

c#²Ù×÷Excel һЩÎÊÌâ ×Ö·û±äΪnull½â¾ö·½·¨


C#¶ÁÈ¡ExcelÓöµ½ÎÞ·¨¶ÁÈ¡µÄ½â¾ö·½·¨£º
1.ÔÚµ¼ÈëÊý¾ÝÁ¬½Ó×Ö·û´®ÖУ¬½«IMEX=1¼ÓÈ룬“Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\Data.xls";Extended Properties="Excel 8.0;HDR=Yes;IMEX=1; ”£¬ÕâÑù¾Í¿ÉÒÔ¡£
C#¶ÁÈ¡ExcelÐèҪעÒâµÄ£º
IMEX=1£º»ìºÏģʽ
HDR=Yes; ÊÇ·ñÈõÚÒ»ÐÐ×÷ΪÁÐÍ·
Á½Õß±ØÐëÒ»Æ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ