Posted on 2010/11/23 15:05
Filed Under Mobile/IPAD

DNS server, DNS service  

I have AirPrint work with shared printers in Windows 7 (64bits). Here is the step by step instructions.

1) Install iTunes 10.1
2) Download AirPrint.zip (airprint.exe, libairprint.dll, XpdfPrint.dll)
3) Unzip it.
4) Make a folder, "C:\Program Files (x86)\AirPrint\"
5) Copy the files to "C:\Program Files (x86)\AirPrint\"
6) Run "cmd.exe" as administrator
7) Run the following commands (There should be a space between '=' and '"')

Windows 64bits:
sc.exe create AirPrint binPath= "C:\Program Files (x86)\AirPrint\airprint.exe -s" depend= "Bonjour Service" start= auto
sc.exe start AirPrint

Windows 32bits:
sc.exe create AirPrint binPath= "C:\Program Files\AirPrint\airprint.exe -s" depend= "Bonjour Service" start= auto
sc.exe start AirPrint

8) Let Windows Firewall allow AirPrint to communicate on the networks (Double click on the airprint.exe)

2010/11/23 15:05 2010/11/23 15:05

Posted on 2010/09/09 23:02
Filed Under Programming/C#

DNS server, DNS service  

아래 방법말고도 string.Format 이나 BitConvert.tostring() 을 활용해도 되지만
작성자의 말로는 속도가 빠르다고 하는군요.. 음.. 데이터는 맞으니, 믿어보죠.
참고로 3M 이상의 데이터는 변환안됩니다. 아마도 StringBuilder 의 한계인듯..
다른 방법을 써야겠죠.. 그부분은 알아서.. 그럴 일도 없겠지만.. ㅎㅎ


public static string ByteArrayToHexString(byte[] Bytes)


    StringBuilder Result = new StringBuilder(); 
    string HexAlphabet = "0123456789ABCDEF"; 
  
    foreach (byte B in Bytes) 
        { 
        Result.Append(HexAlphabet[(int)(B >> 4)]); 
        Result.Append(HexAlphabet[(int)(B & 0xF)]); 
        } 
  
    return Result.ToString(); 

  
public static byte[] HexStringToByteArray(string Hex) 

    byte[] Bytes = new byte[Hex.Length / 2]; 
    int[] HexValue = new int[] { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 
                                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x0B, 0x0C, 0x0D, 
                                 0x0E, 0x0F }; 
  
    for (int x = 0, i = 0; i < Hex.Length; i += 2, x += 1) 
        { 
        Bytes[x] = (byte)(HexValue[Char.ToUpper(Hex[i + 0]) - '0'] << 4 | 
                          HexValue[Char.ToUpper(Hex[i + 1]) - '0']); 
    } 
  
    return Bytes; 
}

2010/09/09 23:02 2010/09/09 23:02

About

by CoCo

Notice

Counter

· Total
: 846588
· Today
: 75
· Yesterday
: 70