VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "dwCPInfo"
Attribute VB_Creatable = True
Attribute VB_Exposed = True
Option Explicit

' Class dwCPInfo
' Desaware API Class library
' Copyright (c) 1996 by Desaware Inc.
' All rights reserved


#If Win32 Then
Private iCPInfo As CPINFO

Public Sub CopyToCPINFO(ByVal lpCPInfo As Long)
        
    If lpCPInfo = 0 Then RaiseError 5, "dwCPInfo"
    agCopyData iCPInfo, ByVal lpCPInfo, LenB(iCPInfo)
End Sub

Public Sub CopyFromCPINFO(ByVal lpCPInfo As Long)
        
    If lpCPInfo = 0 Then RaiseError 5, "dwCPInfo"
    agCopyData ByVal lpCPInfo, iCPInfo, LenB(iCPInfo)
End Sub

Public Property Get MaxCharSize() As Long
    MaxCharSize = iCPInfo.MaxCharSize
End Property

Public Property Let MaxCharSize(vNewValue As Long)
    iCPInfo.MaxCharSize = vNewValue
End Property

Public Property Get DefaultChar(i As Integer) As Byte
    DefaultChar = iCPInfo.DefaultChar(i)
End Property

Public Property Let DefaultChar(i As Integer, vNewValue As Byte)
    iCPInfo.DefaultChar(i) = vNewValue
End Property

Public Property Get LeadByte(i As Integer) As Byte
    LeadByte = iCPInfo.LeadByte(i)
End Property

Public Property Let LeadByte(i As Integer, vNewValue As Byte)
    iCPInfo.LeadByte(i) = vNewValue
End Property

#End If ' this class only exists in win32
