Initial
This commit is contained in:
951
proto/junk/Historic.java
Normal file
951
proto/junk/Historic.java
Normal file
@@ -0,0 +1,951 @@
|
||||
package zbi.risk.server.vhi.mapped
|
||||
|
||||
|
||||
public class Historic
|
||||
{
|
||||
private Timestamp tradeDate;
|
||||
private String tradeDateTxt;
|
||||
private String portfolio;
|
||||
private String subPortfolio;
|
||||
private String ticker;
|
||||
private String tickerDesc;
|
||||
private String uticker;
|
||||
private String instrument;
|
||||
private float mktCap;
|
||||
private float wgtAve;
|
||||
private float volume;
|
||||
private float contractSize;
|
||||
private String hedgeIndex;
|
||||
private String hedgeSector;
|
||||
private String area;
|
||||
private String areaSector;
|
||||
private float [close];
|
||||
private float yClose;
|
||||
private float utickerClose;
|
||||
private float yUtickerClose;
|
||||
private float delta;
|
||||
private float yDelta;
|
||||
private int daysExpire;
|
||||
private float strikePrice;
|
||||
private float hedgeBeta;
|
||||
private float areaBeta;
|
||||
private float sectorBeta;
|
||||
private float groupBeta;
|
||||
private float qty;
|
||||
private float yQty;
|
||||
private float qtyChange;
|
||||
private float hedgeClose;
|
||||
private float hedgePerc;
|
||||
private float areaClose;
|
||||
private float areaPerc;
|
||||
private float sectorClose;
|
||||
private float sectorPerc;
|
||||
private float mktValue;
|
||||
private float yMktValue;
|
||||
private float pnl;
|
||||
private float exposure;
|
||||
private float yExposure;
|
||||
private float hbExposure;
|
||||
private float yHbExposure;
|
||||
private float abExposure;
|
||||
private float yAbExposure;
|
||||
private float sbExposure;
|
||||
private float ySbExposure;
|
||||
private float areaPnlAmt;
|
||||
private float sectorPnlAmt;
|
||||
private float pnlPerc;
|
||||
private float priceChange;
|
||||
private float priceChangePerc;
|
||||
private float priceChangeAmt;
|
||||
private float sectorAlphaPerc;
|
||||
private float groupAlphaPerc;
|
||||
private float areaAlphaPerc;
|
||||
private float sectorAlphaAmt;
|
||||
private float groupAlphaAmt;
|
||||
private float areaAlphaAmt;
|
||||
private float abReturnAmt;
|
||||
private float abReturnPerc;
|
||||
private float intradayPerc;
|
||||
private float intradayAmt;
|
||||
private float optionalityAmt;
|
||||
private float optionalityPerc;
|
||||
private String currency;
|
||||
private float baseClose;
|
||||
private float yBaseClose;
|
||||
private float fxPerc;
|
||||
private float fxAmt;
|
||||
private float fxRate;
|
||||
private float yFxRate;
|
||||
private float altIndexReturnPerc;
|
||||
private float altIndexReturnAmt;
|
||||
private float indexBetaAdjPerc;
|
||||
private float indexBetaAdjAmt;
|
||||
private float vwap;
|
||||
private float vwapPnl;
|
||||
private float hedgeAlphaAmt;
|
||||
private String exposureView;
|
||||
private String marketView;
|
||||
private String callPut;
|
||||
private String [month];
|
||||
private boolean private;
|
||||
private boolean ipo;
|
||||
private float ratio;
|
||||
private String source;
|
||||
private Timestamp goAround;
|
||||
private float adh;
|
||||
private float aac;
|
||||
private float azap;
|
||||
private boolean exported;
|
||||
private float hedgeAlphaPerc;
|
||||
private float alphaGoAround;
|
||||
private float alphaReal;
|
||||
private float alphaUnreal;
|
||||
private float pnlReal;
|
||||
private float pnlUnreal;
|
||||
private float cashFlow;
|
||||
private float betaCashFlow;
|
||||
private Timestamp lastTradeDate;
|
||||
private float lastTradeQty;
|
||||
private float enterpriseValue;
|
||||
private String associate;
|
||||
public Timestamp getTradeDate()
|
||||
{
|
||||
return tradeDate;
|
||||
}
|
||||
public void setTradeDate(Timestamp tradeDate)
|
||||
{
|
||||
this.tradeDate=tradeDate;
|
||||
}
|
||||
public String getTradeDateTxt()
|
||||
{
|
||||
return tradeDateTxt;
|
||||
}
|
||||
public void setTradeDateTxt(String tradeDateTxt)
|
||||
{
|
||||
this.tradeDateTxt=tradeDateTxt;
|
||||
}
|
||||
public String getPortfolio()
|
||||
{
|
||||
return portfolio;
|
||||
}
|
||||
public void setPortfolio(String portfolio)
|
||||
{
|
||||
this.portfolio=portfolio;
|
||||
}
|
||||
public String getSubPortfolio()
|
||||
{
|
||||
return subPortfolio;
|
||||
}
|
||||
public void setSubPortfolio(String subPortfolio)
|
||||
{
|
||||
this.subPortfolio=subPortfolio;
|
||||
}
|
||||
public String getTicker()
|
||||
{
|
||||
return ticker;
|
||||
}
|
||||
public void setTicker(String ticker)
|
||||
{
|
||||
this.ticker=ticker;
|
||||
}
|
||||
public String getTickerDesc()
|
||||
{
|
||||
return tickerDesc;
|
||||
}
|
||||
public void setTickerDesc(String tickerDesc)
|
||||
{
|
||||
this.tickerDesc=tickerDesc;
|
||||
}
|
||||
public String getUticker()
|
||||
{
|
||||
return uticker;
|
||||
}
|
||||
public void setUticker(String uticker)
|
||||
{
|
||||
this.uticker=uticker;
|
||||
}
|
||||
public String getInstrument()
|
||||
{
|
||||
return instrument;
|
||||
}
|
||||
public void setInstrument(String instrument)
|
||||
{
|
||||
this.instrument=instrument;
|
||||
}
|
||||
public float getMktCap()
|
||||
{
|
||||
return mktCap;
|
||||
}
|
||||
public void setMktCap(float mktCap)
|
||||
{
|
||||
this.mktCap=mktCap;
|
||||
}
|
||||
public float getWgtAve()
|
||||
{
|
||||
return wgtAve;
|
||||
}
|
||||
public void setWgtAve(float wgtAve)
|
||||
{
|
||||
this.wgtAve=wgtAve;
|
||||
}
|
||||
public float getVolume()
|
||||
{
|
||||
return volume;
|
||||
}
|
||||
public void setVolume(float volume)
|
||||
{
|
||||
this.volume=volume;
|
||||
}
|
||||
public float getContractSize()
|
||||
{
|
||||
return contractSize;
|
||||
}
|
||||
public void setContractSize(float contractSize)
|
||||
{
|
||||
this.contractSize=contractSize;
|
||||
}
|
||||
public String getHedgeIndex()
|
||||
{
|
||||
return hedgeIndex;
|
||||
}
|
||||
public void setHedgeIndex(String hedgeIndex)
|
||||
{
|
||||
this.hedgeIndex=hedgeIndex;
|
||||
}
|
||||
public String getHedgeSector()
|
||||
{
|
||||
return hedgeSector;
|
||||
}
|
||||
public void setHedgeSector(String hedgeSector)
|
||||
{
|
||||
this.hedgeSector=hedgeSector;
|
||||
}
|
||||
public String getArea()
|
||||
{
|
||||
return area;
|
||||
}
|
||||
public void setArea(String area)
|
||||
{
|
||||
this.area=area;
|
||||
}
|
||||
public String getAreaSector()
|
||||
{
|
||||
return areaSector;
|
||||
}
|
||||
public void setAreaSector(String areaSector)
|
||||
{
|
||||
this.areaSector=areaSector;
|
||||
}
|
||||
public float get[close]()
|
||||
{
|
||||
return [close];
|
||||
}
|
||||
public void set[close](float [close])
|
||||
{
|
||||
this.[close]=[close];
|
||||
}
|
||||
public float getYClose()
|
||||
{
|
||||
return yClose;
|
||||
}
|
||||
public void setYClose(float yClose)
|
||||
{
|
||||
this.yClose=yClose;
|
||||
}
|
||||
public float getUtickerClose()
|
||||
{
|
||||
return utickerClose;
|
||||
}
|
||||
public void setUtickerClose(float utickerClose)
|
||||
{
|
||||
this.utickerClose=utickerClose;
|
||||
}
|
||||
public float getYUtickerClose()
|
||||
{
|
||||
return yUtickerClose;
|
||||
}
|
||||
public void setYUtickerClose(float yUtickerClose)
|
||||
{
|
||||
this.yUtickerClose=yUtickerClose;
|
||||
}
|
||||
public float getDelta()
|
||||
{
|
||||
return delta;
|
||||
}
|
||||
public void setDelta(float delta)
|
||||
{
|
||||
this.delta=delta;
|
||||
}
|
||||
public float getYDelta()
|
||||
{
|
||||
return yDelta;
|
||||
}
|
||||
public void setYDelta(float yDelta)
|
||||
{
|
||||
this.yDelta=yDelta;
|
||||
}
|
||||
public int getDaysExpire()
|
||||
{
|
||||
return daysExpire;
|
||||
}
|
||||
public void setDaysExpire(int daysExpire)
|
||||
{
|
||||
this.daysExpire=daysExpire;
|
||||
}
|
||||
public float getStrikePrice()
|
||||
{
|
||||
return strikePrice;
|
||||
}
|
||||
public void setStrikePrice(float strikePrice)
|
||||
{
|
||||
this.strikePrice=strikePrice;
|
||||
}
|
||||
public float getHedgeBeta()
|
||||
{
|
||||
return hedgeBeta;
|
||||
}
|
||||
public void setHedgeBeta(float hedgeBeta)
|
||||
{
|
||||
this.hedgeBeta=hedgeBeta;
|
||||
}
|
||||
public float getAreaBeta()
|
||||
{
|
||||
return areaBeta;
|
||||
}
|
||||
public void setAreaBeta(float areaBeta)
|
||||
{
|
||||
this.areaBeta=areaBeta;
|
||||
}
|
||||
public float getSectorBeta()
|
||||
{
|
||||
return sectorBeta;
|
||||
}
|
||||
public void setSectorBeta(float sectorBeta)
|
||||
{
|
||||
this.sectorBeta=sectorBeta;
|
||||
}
|
||||
public float getGroupBeta()
|
||||
{
|
||||
return groupBeta;
|
||||
}
|
||||
public void setGroupBeta(float groupBeta)
|
||||
{
|
||||
this.groupBeta=groupBeta;
|
||||
}
|
||||
public float getQty()
|
||||
{
|
||||
return qty;
|
||||
}
|
||||
public void setQty(float qty)
|
||||
{
|
||||
this.qty=qty;
|
||||
}
|
||||
public float getYQty()
|
||||
{
|
||||
return yQty;
|
||||
}
|
||||
public void setYQty(float yQty)
|
||||
{
|
||||
this.yQty=yQty;
|
||||
}
|
||||
public float getQtyChange()
|
||||
{
|
||||
return qtyChange;
|
||||
}
|
||||
public void setQtyChange(float qtyChange)
|
||||
{
|
||||
this.qtyChange=qtyChange;
|
||||
}
|
||||
public float getHedgeClose()
|
||||
{
|
||||
return hedgeClose;
|
||||
}
|
||||
public void setHedgeClose(float hedgeClose)
|
||||
{
|
||||
this.hedgeClose=hedgeClose;
|
||||
}
|
||||
public float getHedgePerc()
|
||||
{
|
||||
return hedgePerc;
|
||||
}
|
||||
public void setHedgePerc(float hedgePerc)
|
||||
{
|
||||
this.hedgePerc=hedgePerc;
|
||||
}
|
||||
public float getAreaClose()
|
||||
{
|
||||
return areaClose;
|
||||
}
|
||||
public void setAreaClose(float areaClose)
|
||||
{
|
||||
this.areaClose=areaClose;
|
||||
}
|
||||
public float getAreaPerc()
|
||||
{
|
||||
return areaPerc;
|
||||
}
|
||||
public void setAreaPerc(float areaPerc)
|
||||
{
|
||||
this.areaPerc=areaPerc;
|
||||
}
|
||||
public float getSectorClose()
|
||||
{
|
||||
return sectorClose;
|
||||
}
|
||||
public void setSectorClose(float sectorClose)
|
||||
{
|
||||
this.sectorClose=sectorClose;
|
||||
}
|
||||
public float getSectorPerc()
|
||||
{
|
||||
return sectorPerc;
|
||||
}
|
||||
public void setSectorPerc(float sectorPerc)
|
||||
{
|
||||
this.sectorPerc=sectorPerc;
|
||||
}
|
||||
public float getMktValue()
|
||||
{
|
||||
return mktValue;
|
||||
}
|
||||
public void setMktValue(float mktValue)
|
||||
{
|
||||
this.mktValue=mktValue;
|
||||
}
|
||||
public float getYMktValue()
|
||||
{
|
||||
return yMktValue;
|
||||
}
|
||||
public void setYMktValue(float yMktValue)
|
||||
{
|
||||
this.yMktValue=yMktValue;
|
||||
}
|
||||
public float getPnl()
|
||||
{
|
||||
return pnl;
|
||||
}
|
||||
public void setPnl(float pnl)
|
||||
{
|
||||
this.pnl=pnl;
|
||||
}
|
||||
public float getExposure()
|
||||
{
|
||||
return exposure;
|
||||
}
|
||||
public void setExposure(float exposure)
|
||||
{
|
||||
this.exposure=exposure;
|
||||
}
|
||||
public float getYExposure()
|
||||
{
|
||||
return yExposure;
|
||||
}
|
||||
public void setYExposure(float yExposure)
|
||||
{
|
||||
this.yExposure=yExposure;
|
||||
}
|
||||
public float getHbExposure()
|
||||
{
|
||||
return hbExposure;
|
||||
}
|
||||
public void setHbExposure(float hbExposure)
|
||||
{
|
||||
this.hbExposure=hbExposure;
|
||||
}
|
||||
public float getYHbExposure()
|
||||
{
|
||||
return yHbExposure;
|
||||
}
|
||||
public void setYHbExposure(float yHbExposure)
|
||||
{
|
||||
this.yHbExposure=yHbExposure;
|
||||
}
|
||||
public float getAbExposure()
|
||||
{
|
||||
return abExposure;
|
||||
}
|
||||
public void setAbExposure(float abExposure)
|
||||
{
|
||||
this.abExposure=abExposure;
|
||||
}
|
||||
public float getYAbExposure()
|
||||
{
|
||||
return yAbExposure;
|
||||
}
|
||||
public void setYAbExposure(float yAbExposure)
|
||||
{
|
||||
this.yAbExposure=yAbExposure;
|
||||
}
|
||||
public float getSbExposure()
|
||||
{
|
||||
return sbExposure;
|
||||
}
|
||||
public void setSbExposure(float sbExposure)
|
||||
{
|
||||
this.sbExposure=sbExposure;
|
||||
}
|
||||
public float getYSbExposure()
|
||||
{
|
||||
return ySbExposure;
|
||||
}
|
||||
public void setYSbExposure(float ySbExposure)
|
||||
{
|
||||
this.ySbExposure=ySbExposure;
|
||||
}
|
||||
public float getAreaPnlAmt()
|
||||
{
|
||||
return areaPnlAmt;
|
||||
}
|
||||
public void setAreaPnlAmt(float areaPnlAmt)
|
||||
{
|
||||
this.areaPnlAmt=areaPnlAmt;
|
||||
}
|
||||
public float getSectorPnlAmt()
|
||||
{
|
||||
return sectorPnlAmt;
|
||||
}
|
||||
public void setSectorPnlAmt(float sectorPnlAmt)
|
||||
{
|
||||
this.sectorPnlAmt=sectorPnlAmt;
|
||||
}
|
||||
public float getPnlPerc()
|
||||
{
|
||||
return pnlPerc;
|
||||
}
|
||||
public void setPnlPerc(float pnlPerc)
|
||||
{
|
||||
this.pnlPerc=pnlPerc;
|
||||
}
|
||||
public float getPriceChange()
|
||||
{
|
||||
return priceChange;
|
||||
}
|
||||
public void setPriceChange(float priceChange)
|
||||
{
|
||||
this.priceChange=priceChange;
|
||||
}
|
||||
public float getPriceChangePerc()
|
||||
{
|
||||
return priceChangePerc;
|
||||
}
|
||||
public void setPriceChangePerc(float priceChangePerc)
|
||||
{
|
||||
this.priceChangePerc=priceChangePerc;
|
||||
}
|
||||
public float getPriceChangeAmt()
|
||||
{
|
||||
return priceChangeAmt;
|
||||
}
|
||||
public void setPriceChangeAmt(float priceChangeAmt)
|
||||
{
|
||||
this.priceChangeAmt=priceChangeAmt;
|
||||
}
|
||||
public float getSectorAlphaPerc()
|
||||
{
|
||||
return sectorAlphaPerc;
|
||||
}
|
||||
public void setSectorAlphaPerc(float sectorAlphaPerc)
|
||||
{
|
||||
this.sectorAlphaPerc=sectorAlphaPerc;
|
||||
}
|
||||
public float getGroupAlphaPerc()
|
||||
{
|
||||
return groupAlphaPerc;
|
||||
}
|
||||
public void setGroupAlphaPerc(float groupAlphaPerc)
|
||||
{
|
||||
this.groupAlphaPerc=groupAlphaPerc;
|
||||
}
|
||||
public float getAreaAlphaPerc()
|
||||
{
|
||||
return areaAlphaPerc;
|
||||
}
|
||||
public void setAreaAlphaPerc(float areaAlphaPerc)
|
||||
{
|
||||
this.areaAlphaPerc=areaAlphaPerc;
|
||||
}
|
||||
public float getSectorAlphaAmt()
|
||||
{
|
||||
return sectorAlphaAmt;
|
||||
}
|
||||
public void setSectorAlphaAmt(float sectorAlphaAmt)
|
||||
{
|
||||
this.sectorAlphaAmt=sectorAlphaAmt;
|
||||
}
|
||||
public float getGroupAlphaAmt()
|
||||
{
|
||||
return groupAlphaAmt;
|
||||
}
|
||||
public void setGroupAlphaAmt(float groupAlphaAmt)
|
||||
{
|
||||
this.groupAlphaAmt=groupAlphaAmt;
|
||||
}
|
||||
public float getAreaAlphaAmt()
|
||||
{
|
||||
return areaAlphaAmt;
|
||||
}
|
||||
public void setAreaAlphaAmt(float areaAlphaAmt)
|
||||
{
|
||||
this.areaAlphaAmt=areaAlphaAmt;
|
||||
}
|
||||
public float getAbReturnAmt()
|
||||
{
|
||||
return abReturnAmt;
|
||||
}
|
||||
public void setAbReturnAmt(float abReturnAmt)
|
||||
{
|
||||
this.abReturnAmt=abReturnAmt;
|
||||
}
|
||||
public float getAbReturnPerc()
|
||||
{
|
||||
return abReturnPerc;
|
||||
}
|
||||
public void setAbReturnPerc(float abReturnPerc)
|
||||
{
|
||||
this.abReturnPerc=abReturnPerc;
|
||||
}
|
||||
public float getIntradayPerc()
|
||||
{
|
||||
return intradayPerc;
|
||||
}
|
||||
public void setIntradayPerc(float intradayPerc)
|
||||
{
|
||||
this.intradayPerc=intradayPerc;
|
||||
}
|
||||
public float getIntradayAmt()
|
||||
{
|
||||
return intradayAmt;
|
||||
}
|
||||
public void setIntradayAmt(float intradayAmt)
|
||||
{
|
||||
this.intradayAmt=intradayAmt;
|
||||
}
|
||||
public float getOptionalityAmt()
|
||||
{
|
||||
return optionalityAmt;
|
||||
}
|
||||
public void setOptionalityAmt(float optionalityAmt)
|
||||
{
|
||||
this.optionalityAmt=optionalityAmt;
|
||||
}
|
||||
public float getOptionalityPerc()
|
||||
{
|
||||
return optionalityPerc;
|
||||
}
|
||||
public void setOptionalityPerc(float optionalityPerc)
|
||||
{
|
||||
this.optionalityPerc=optionalityPerc;
|
||||
}
|
||||
public String getCurrency()
|
||||
{
|
||||
return currency;
|
||||
}
|
||||
public void setCurrency(String currency)
|
||||
{
|
||||
this.currency=currency;
|
||||
}
|
||||
public float getBaseClose()
|
||||
{
|
||||
return baseClose;
|
||||
}
|
||||
public void setBaseClose(float baseClose)
|
||||
{
|
||||
this.baseClose=baseClose;
|
||||
}
|
||||
public float getYBaseClose()
|
||||
{
|
||||
return yBaseClose;
|
||||
}
|
||||
public void setYBaseClose(float yBaseClose)
|
||||
{
|
||||
this.yBaseClose=yBaseClose;
|
||||
}
|
||||
public float getFxPerc()
|
||||
{
|
||||
return fxPerc;
|
||||
}
|
||||
public void setFxPerc(float fxPerc)
|
||||
{
|
||||
this.fxPerc=fxPerc;
|
||||
}
|
||||
public float getFxAmt()
|
||||
{
|
||||
return fxAmt;
|
||||
}
|
||||
public void setFxAmt(float fxAmt)
|
||||
{
|
||||
this.fxAmt=fxAmt;
|
||||
}
|
||||
public float getFxRate()
|
||||
{
|
||||
return fxRate;
|
||||
}
|
||||
public void setFxRate(float fxRate)
|
||||
{
|
||||
this.fxRate=fxRate;
|
||||
}
|
||||
public float getYFxRate()
|
||||
{
|
||||
return yFxRate;
|
||||
}
|
||||
public void setYFxRate(float yFxRate)
|
||||
{
|
||||
this.yFxRate=yFxRate;
|
||||
}
|
||||
public float getAltIndexReturnPerc()
|
||||
{
|
||||
return altIndexReturnPerc;
|
||||
}
|
||||
public void setAltIndexReturnPerc(float altIndexReturnPerc)
|
||||
{
|
||||
this.altIndexReturnPerc=altIndexReturnPerc;
|
||||
}
|
||||
public float getAltIndexReturnAmt()
|
||||
{
|
||||
return altIndexReturnAmt;
|
||||
}
|
||||
public void setAltIndexReturnAmt(float altIndexReturnAmt)
|
||||
{
|
||||
this.altIndexReturnAmt=altIndexReturnAmt;
|
||||
}
|
||||
public float getIndexBetaAdjPerc()
|
||||
{
|
||||
return indexBetaAdjPerc;
|
||||
}
|
||||
public void setIndexBetaAdjPerc(float indexBetaAdjPerc)
|
||||
{
|
||||
this.indexBetaAdjPerc=indexBetaAdjPerc;
|
||||
}
|
||||
public float getIndexBetaAdjAmt()
|
||||
{
|
||||
return indexBetaAdjAmt;
|
||||
}
|
||||
public void setIndexBetaAdjAmt(float indexBetaAdjAmt)
|
||||
{
|
||||
this.indexBetaAdjAmt=indexBetaAdjAmt;
|
||||
}
|
||||
public float getVwap()
|
||||
{
|
||||
return vwap;
|
||||
}
|
||||
public void setVwap(float vwap)
|
||||
{
|
||||
this.vwap=vwap;
|
||||
}
|
||||
public float getVwapPnl()
|
||||
{
|
||||
return vwapPnl;
|
||||
}
|
||||
public void setVwapPnl(float vwapPnl)
|
||||
{
|
||||
this.vwapPnl=vwapPnl;
|
||||
}
|
||||
public float getHedgeAlphaAmt()
|
||||
{
|
||||
return hedgeAlphaAmt;
|
||||
}
|
||||
public void setHedgeAlphaAmt(float hedgeAlphaAmt)
|
||||
{
|
||||
this.hedgeAlphaAmt=hedgeAlphaAmt;
|
||||
}
|
||||
public String getExposureView()
|
||||
{
|
||||
return exposureView;
|
||||
}
|
||||
public void setExposureView(String exposureView)
|
||||
{
|
||||
this.exposureView=exposureView;
|
||||
}
|
||||
public String getMarketView()
|
||||
{
|
||||
return marketView;
|
||||
}
|
||||
public void setMarketView(String marketView)
|
||||
{
|
||||
this.marketView=marketView;
|
||||
}
|
||||
public String getCallPut()
|
||||
{
|
||||
return callPut;
|
||||
}
|
||||
public void setCallPut(String callPut)
|
||||
{
|
||||
this.callPut=callPut;
|
||||
}
|
||||
public String get[month]()
|
||||
{
|
||||
return [month];
|
||||
}
|
||||
public void set[month](String [month])
|
||||
{
|
||||
this.[month]=[month];
|
||||
}
|
||||
public boolean getPrivate()
|
||||
{
|
||||
return private;
|
||||
}
|
||||
public void setPrivate(boolean private)
|
||||
{
|
||||
this.private=private;
|
||||
}
|
||||
public boolean getIpo()
|
||||
{
|
||||
return ipo;
|
||||
}
|
||||
public void setIpo(boolean ipo)
|
||||
{
|
||||
this.ipo=ipo;
|
||||
}
|
||||
public float getRatio()
|
||||
{
|
||||
return ratio;
|
||||
}
|
||||
public void setRatio(float ratio)
|
||||
{
|
||||
this.ratio=ratio;
|
||||
}
|
||||
public String getSource()
|
||||
{
|
||||
return source;
|
||||
}
|
||||
public void setSource(String source)
|
||||
{
|
||||
this.source=source;
|
||||
}
|
||||
public Timestamp getGoAround()
|
||||
{
|
||||
return goAround;
|
||||
}
|
||||
public void setGoAround(Timestamp goAround)
|
||||
{
|
||||
this.goAround=goAround;
|
||||
}
|
||||
public float getAdh()
|
||||
{
|
||||
return adh;
|
||||
}
|
||||
public void setAdh(float adh)
|
||||
{
|
||||
this.adh=adh;
|
||||
}
|
||||
public float getAac()
|
||||
{
|
||||
return aac;
|
||||
}
|
||||
public void setAac(float aac)
|
||||
{
|
||||
this.aac=aac;
|
||||
}
|
||||
public float getAzap()
|
||||
{
|
||||
return azap;
|
||||
}
|
||||
public void setAzap(float azap)
|
||||
{
|
||||
this.azap=azap;
|
||||
}
|
||||
public boolean getExported()
|
||||
{
|
||||
return exported;
|
||||
}
|
||||
public void setExported(boolean exported)
|
||||
{
|
||||
this.exported=exported;
|
||||
}
|
||||
public float getHedgeAlphaPerc()
|
||||
{
|
||||
return hedgeAlphaPerc;
|
||||
}
|
||||
public void setHedgeAlphaPerc(float hedgeAlphaPerc)
|
||||
{
|
||||
this.hedgeAlphaPerc=hedgeAlphaPerc;
|
||||
}
|
||||
public float getAlphaGoAround()
|
||||
{
|
||||
return alphaGoAround;
|
||||
}
|
||||
public void setAlphaGoAround(float alphaGoAround)
|
||||
{
|
||||
this.alphaGoAround=alphaGoAround;
|
||||
}
|
||||
public float getAlphaReal()
|
||||
{
|
||||
return alphaReal;
|
||||
}
|
||||
public void setAlphaReal(float alphaReal)
|
||||
{
|
||||
this.alphaReal=alphaReal;
|
||||
}
|
||||
public float getAlphaUnreal()
|
||||
{
|
||||
return alphaUnreal;
|
||||
}
|
||||
public void setAlphaUnreal(float alphaUnreal)
|
||||
{
|
||||
this.alphaUnreal=alphaUnreal;
|
||||
}
|
||||
public float getPnlReal()
|
||||
{
|
||||
return pnlReal;
|
||||
}
|
||||
public void setPnlReal(float pnlReal)
|
||||
{
|
||||
this.pnlReal=pnlReal;
|
||||
}
|
||||
public float getPnlUnreal()
|
||||
{
|
||||
return pnlUnreal;
|
||||
}
|
||||
public void setPnlUnreal(float pnlUnreal)
|
||||
{
|
||||
this.pnlUnreal=pnlUnreal;
|
||||
}
|
||||
public float getCashFlow()
|
||||
{
|
||||
return cashFlow;
|
||||
}
|
||||
public void setCashFlow(float cashFlow)
|
||||
{
|
||||
this.cashFlow=cashFlow;
|
||||
}
|
||||
public float getBetaCashFlow()
|
||||
{
|
||||
return betaCashFlow;
|
||||
}
|
||||
public void setBetaCashFlow(float betaCashFlow)
|
||||
{
|
||||
this.betaCashFlow=betaCashFlow;
|
||||
}
|
||||
public Timestamp getLastTradeDate()
|
||||
{
|
||||
return lastTradeDate;
|
||||
}
|
||||
public void setLastTradeDate(Timestamp lastTradeDate)
|
||||
{
|
||||
this.lastTradeDate=lastTradeDate;
|
||||
}
|
||||
public float getLastTradeQty()
|
||||
{
|
||||
return lastTradeQty;
|
||||
}
|
||||
public void setLastTradeQty(float lastTradeQty)
|
||||
{
|
||||
this.lastTradeQty=lastTradeQty;
|
||||
}
|
||||
public float getEnterpriseValue()
|
||||
{
|
||||
return enterpriseValue;
|
||||
}
|
||||
public void setEnterpriseValue(float enterpriseValue)
|
||||
{
|
||||
this.enterpriseValue=enterpriseValue;
|
||||
}
|
||||
public String getAssociate()
|
||||
{
|
||||
return associate;
|
||||
}
|
||||
public void setAssociate(String associate)
|
||||
{
|
||||
this.associate=associate;
|
||||
}
|
||||
};
|
||||
53
proto/junk/HistoricRS.java
Normal file
53
proto/junk/HistoricRS.java
Normal file
@@ -0,0 +1,53 @@
|
||||
package zbi.risk.server.vhi.mapped
|
||||
|
||||
public class HistoricDA
|
||||
{
|
||||
public List readAll()throws SQLException
|
||||
{
|
||||
Statement statement=null;
|
||||
ResultSet rs=null;
|
||||
Connection connection=null;
|
||||
String strQuery=null;
|
||||
List list=null;
|
||||
|
||||
try
|
||||
{
|
||||
<classname> <instancename> = new <classname>
|
||||
connection=getConnection();
|
||||
statement=connection.createStatement();
|
||||
list=new ArrayList();
|
||||
strQuery="select jdjdjd djdjdjd djdjdjd from <tablename>";
|
||||
rs=statement.executeQuery(strQuery);
|
||||
while(rs.next())
|
||||
{
|
||||
<assign variables>
|
||||
list.add(<instancename>);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if(null!=rs)rs.close();
|
||||
if(null!=statement)statement.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private Connection getConnection()throws SQLException
|
||||
{
|
||||
try
|
||||
{
|
||||
InitialContext jndiCntx=new InitialContext();
|
||||
DataSource ds=(DataSource)jndiCntx.lookup("java:MailDb");
|
||||
jndiCntx.close();
|
||||
return ds.getConnection();
|
||||
}
|
||||
catch(NamingException exception)
|
||||
{
|
||||
message("[MailEJB::getConnection] Object not found");
|
||||
throw new EJBException(exception);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
106
proto/junk/HookDLL.dsp
Normal file
106
proto/junk/HookDLL.dsp
Normal file
@@ -0,0 +1,106 @@
|
||||
# Microsoft Developer Studio Project File - Name="HookDLL" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=HookDLL - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "HookDLL.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "HookDLL.mak" CFG="HookDLL - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "HookDLL - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "HookDLL - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "HookDLL - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HOOKDLL_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HOOKDLL_EXPORTS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "HookDLL - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "HookDLL___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "HookDLL___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "debug"
|
||||
# PROP Intermediate_Dir "debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HOOKDLL_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /Gz /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "HOOKDLL_EXPORTS" /D "STRICT" /D "__FLAT__" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "HookDLL - Win32 Release"
|
||||
# Name "HookDLL - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\hookdll.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
44
proto/junk/HookDLL.dsw
Normal file
44
proto/junk/HookDLL.dsw
Normal file
@@ -0,0 +1,44 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "HookDLL"=.\HookDLL.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=..\common\common.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
proto/junk/HookDLL.ncb
Normal file
BIN
proto/junk/HookDLL.ncb
Normal file
Binary file not shown.
BIN
proto/junk/HookDLL.opt
Normal file
BIN
proto/junk/HookDLL.opt
Normal file
Binary file not shown.
26
proto/junk/HookDLL.plg
Normal file
26
proto/junk/HookDLL.plg
Normal file
@@ -0,0 +1,26 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: HookDLL - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP13F.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"debug/HookDLL.pdb" /debug /machine:I386 /out:"debug/HookDLL.dll" /implib:"debug/HookDLL.lib" /pdbtype:sept
|
||||
.\debug\hookdll.obj
|
||||
\work\exe\mscommon.lib
|
||||
]
|
||||
Creating command line "link.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSP13F.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Linking...
|
||||
Creating library debug/HookDLL.lib and object debug/HookDLL.exp
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
HookDLL.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
72
proto/junk/NameValuePair.hpp
Normal file
72
proto/junk/NameValuePair.hpp
Normal file
@@ -0,0 +1,72 @@
|
||||
#ifndef _PROTO_NAMEVALUE_HPP_
|
||||
#define _PROTO_NAMEVALUE_HPP_
|
||||
#ifndef _COMMON_STRING_HPP_
|
||||
#include <common/string.hpp>
|
||||
#endif
|
||||
|
||||
class NameValuePair
|
||||
{
|
||||
public:
|
||||
NameValuePair();
|
||||
NameValuePair(const String &name,const String &value);
|
||||
const String &getName(void)const;
|
||||
void setName(const String &name);
|
||||
const String &getValue(void)const;
|
||||
void setValue(const String &value);
|
||||
bool fromString(const String &string);
|
||||
String toString(void)const;
|
||||
private:
|
||||
String mName;
|
||||
String mValue;
|
||||
};
|
||||
|
||||
inline
|
||||
NameValuePair::NameValuePair()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
NameValuePair::NameValuePair(const String &name,const String &value)
|
||||
: mName(name), mValue(value)
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
const String &NameValuePair::getName(void)const
|
||||
{
|
||||
return mName;
|
||||
}
|
||||
|
||||
inline
|
||||
void NameValuePair::setName(const String &name)
|
||||
{
|
||||
mName=name;
|
||||
}
|
||||
|
||||
inline
|
||||
const String &NameValuePair::getValue(void)const
|
||||
{
|
||||
return mValue;
|
||||
}
|
||||
|
||||
inline
|
||||
void NameValuePair::setValue(const String &value)
|
||||
{
|
||||
mValue=value;
|
||||
}
|
||||
|
||||
inline
|
||||
bool NameValuePair::fromString(const String &string)
|
||||
{
|
||||
if(string.isNull())return false;
|
||||
mName=string.betweenString(0,'=');
|
||||
mValue=string.betweenString('=',0);
|
||||
return true;
|
||||
}
|
||||
|
||||
inline
|
||||
String NameValuePair::toString(void)const
|
||||
{
|
||||
return mName+String("=")+mValue;
|
||||
}
|
||||
#endif
|
||||
BIN
proto/junk/PAINT.ICO
Normal file
BIN
proto/junk/PAINT.ICO
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 766 B |
BIN
proto/junk/PROCLIB.MDP
Normal file
BIN
proto/junk/PROCLIB.MDP
Normal file
Binary file not shown.
2
proto/junk/PROTO.~RC
Normal file
2
proto/junk/PROTO.~RC
Normal file
@@ -0,0 +1,2 @@
|
||||
#include <windows.h>
|
||||
|
||||
8
proto/junk/StdAfx.cpp
Normal file
8
proto/junk/StdAfx.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// dlltest.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
// TODO: reference any additional headers you need in STDAFX.H
|
||||
// and not in this file
|
||||
107
proto/junk/cbtdll.dsp
Normal file
107
proto/junk/cbtdll.dsp
Normal file
@@ -0,0 +1,107 @@
|
||||
# Microsoft Developer Studio Project File - Name="cbtdll" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=cbtdll - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cbtdll.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "cbtdll.mak" CFG="cbtdll - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "cbtdll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "cbtdll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "cbtdll - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CBTDLL_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CBTDLL_EXPORTS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "cbtdll - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "cbtdll___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "cbtdll___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CBTDLL_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /Gz /MTd /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CBTDLL_EXPORTS" /D "STRICT" /D "__FLAT__" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /map /debug /machine:I386 /pdbtype:sept
|
||||
# SUBTRACT LINK32 /pdb:none
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "cbtdll - Win32 Release"
|
||||
# Name "cbtdll - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dllmain.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
59
proto/junk/cbtdll.dsw
Normal file
59
proto/junk/cbtdll.dsw
Normal file
@@ -0,0 +1,59 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "cbtdll"=.\cbtdll.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name thread
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=..\common\common.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "thread"=..\thread\thread.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
proto/junk/cbtdll.ncb
Normal file
BIN
proto/junk/cbtdll.ncb
Normal file
Binary file not shown.
BIN
proto/junk/cbtdll.opt
Normal file
BIN
proto/junk/cbtdll.opt
Normal file
Binary file not shown.
34
proto/junk/cbtdll.plg
Normal file
34
proto/junk/cbtdll.plg
Normal file
@@ -0,0 +1,34 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: cbtdll - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPB8.tmp" with contents
|
||||
[
|
||||
/nologo /Gz /MTd /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "CBTDLL_EXPORTS" /D "STRICT" /D "__FLAT__" /Fp"Debug/cbtdll.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c
|
||||
"D:\work\proto\dllmain.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPB8.tmp"
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPB9.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"Debug/cbtdll.pdb" /map:"Debug/cbtdll.map" /debug /machine:I386 /out:"Debug/cbtdll.dll" /implib:"Debug/cbtdll.lib" /pdbtype:sept
|
||||
.\Debug\dllmain.obj
|
||||
\work\exe\mscommon.lib
|
||||
\work\exe\msthread.lib
|
||||
]
|
||||
Creating command line "link.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPB9.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
dllmain.cpp
|
||||
Linking...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
cbtdll.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
228
proto/junk/dllmain.cpp
Normal file
228
proto/junk/dllmain.cpp
Normal file
@@ -0,0 +1,228 @@
|
||||
#include <common/string.hpp>
|
||||
#include <common/stdio.hpp>
|
||||
#include <common/file.hpp>
|
||||
#include <common/console.hpp>
|
||||
#include <thread/mutex.hpp>
|
||||
#include <sgi_stl/map.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) bool FAR PASCAL unHook(void);
|
||||
__declspec(dllexport) bool FAR PASCAL setHook(void);
|
||||
}
|
||||
|
||||
bool validate(CREATESTRUCT &createStruct);
|
||||
|
||||
LRESULT CALLBACK cbtHookProc(int nCode,WPARAM wParam,LPARAM lParam);
|
||||
|
||||
LRESULT handleActive(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleClickSkipped(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleCreateWnd(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleDestroyWnd(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleKeySkipped(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleMinMax(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleMoveSize(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleQs(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleSetFocus(WPARAM wParam,LPARAM lParam);
|
||||
LRESULT handleSysCommand(WPARAM wParam,LPARAM lParam);
|
||||
|
||||
HHOOK smhHook=(HHOOK)0;
|
||||
Mutex mutex;
|
||||
File outFile("d:\\log.txt","a+b");
|
||||
|
||||
BOOL WINAPI DLLMain(HINSTANCE hDLLInst,DWORD dwReason,LPVOID lpReserved)
|
||||
{
|
||||
switch(dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH :
|
||||
::printf("Process attach\n");
|
||||
break;
|
||||
case DLL_PROCESS_DETACH :
|
||||
::printf("Process detach\n");
|
||||
break;
|
||||
case DLL_THREAD_ATTACH :
|
||||
::printf("Thread attach\n");
|
||||
break;
|
||||
case DLL_THREAD_DETACH :
|
||||
::printf("Thread detach\n");
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool FAR PASCAL setHook(void)
|
||||
{
|
||||
HINSTANCE hInst=::GetModuleHandle("cbtdll");
|
||||
if(!hInst)return false;
|
||||
smhHook=::SetWindowsHookEx(WH_CBT,(HOOKPROC)&cbtHookProc,hInst,0);
|
||||
return smhHook?true:false;
|
||||
}
|
||||
|
||||
bool FAR PASCAL unHook()
|
||||
{
|
||||
if(!smhHook)return false;
|
||||
::UnhookWindowsHookEx(smhHook);
|
||||
smhHook=0;
|
||||
return true;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK cbtHookProc(int nCode,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
LRESULT result;
|
||||
if(nCode<0)return result=::CallNextHookEx(smhHook,nCode,wParam,lParam);
|
||||
switch(nCode)
|
||||
{
|
||||
case HCBT_ACTIVATE :
|
||||
result=handleActive(wParam,lParam);
|
||||
break;
|
||||
case HCBT_CLICKSKIPPED :
|
||||
result=handleClickSkipped(wParam,lParam);
|
||||
break;
|
||||
case HCBT_CREATEWND :
|
||||
result=handleCreateWnd(wParam,lParam);
|
||||
break;
|
||||
case HCBT_DESTROYWND :
|
||||
result=handleDestroyWnd(wParam,lParam);
|
||||
break;
|
||||
case HCBT_KEYSKIPPED :
|
||||
result=handleKeySkipped(wParam,lParam);
|
||||
break;
|
||||
case HCBT_MINMAX :
|
||||
result=handleMinMax(wParam,lParam);
|
||||
break;
|
||||
case HCBT_MOVESIZE :
|
||||
result=handleMoveSize(wParam,lParam);
|
||||
break;
|
||||
case HCBT_QS :
|
||||
result=handleQs(wParam,lParam);
|
||||
break;
|
||||
case HCBT_SETFOCUS :
|
||||
result=handleSetFocus(wParam,lParam);
|
||||
break;
|
||||
case HCBT_SYSCOMMAND :
|
||||
result=handleSysCommand(wParam,lParam);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// ************************************************************************************************
|
||||
|
||||
LRESULT handleActive(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleClickSkipped(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleCreateWnd(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
CBT_CREATEWND *pCBTCreateWnd;
|
||||
CREATESTRUCT *pCreateStruct;
|
||||
HWND hWnd;
|
||||
HWND hwndParent;
|
||||
String windowName;
|
||||
String parentText;
|
||||
String strLine;
|
||||
|
||||
hWnd=(HWND)wParam;
|
||||
pCBTCreateWnd=(CBT_CREATEWND*)lParam;
|
||||
if(!pCBTCreateWnd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
pCreateStruct=pCBTCreateWnd->lpcs;
|
||||
if(!pCreateStruct)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
hwndParent=pCreateStruct->hwndParent;
|
||||
windowName=pCreateStruct->lpszName;
|
||||
parentText.reserve(String::MaxString);
|
||||
::GetWindowText(hwndParent,parentText,String::MaxString);
|
||||
|
||||
strLine.reserve(1024);
|
||||
::sprintf(strLine.str(),"window name=%s, parent=%s",windowName.str(),parentText.str());
|
||||
|
||||
mutex.requestMutex();
|
||||
outFile.writeLine(strLine);
|
||||
outFile.flush();
|
||||
mutex.releaseMutex();
|
||||
|
||||
if(!validate(*pCreateStruct))
|
||||
{
|
||||
outFile.writeLine("Not allowing child window to activate");
|
||||
outFile.flush();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleDestroyWnd(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleKeySkipped(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleMinMax(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleMoveSize(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleQs(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleSetFocus(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
LRESULT handleSysCommand(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
STDAPI DllCanUnloadNow(void)
|
||||
{
|
||||
::printf("DllCanUnloadNow\n");
|
||||
return S_OK; // S_FALSE
|
||||
}
|
||||
|
||||
STDAPI DllUnregisterServer(void)
|
||||
{
|
||||
::printf("DllUnregisterServer\n");
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
bool validate(CREATESTRUCT &createStruct)
|
||||
{
|
||||
String parentText;
|
||||
String moduleFileName;
|
||||
|
||||
moduleFileName.reserve(512);
|
||||
::GetModuleFileName(createStruct.hInstance,moduleFileName.str(),512);
|
||||
outFile.writeLine(moduleFileName);
|
||||
parentText.reserve(String::MaxString);
|
||||
::GetWindowText(createStruct.hwndParent,parentText,String::MaxString);
|
||||
// if(parentText==String("Internet Explorer"))return false;
|
||||
// if(parentText==String("Microsoft Internet Explorer"))return false;
|
||||
return true;
|
||||
}
|
||||
96
proto/junk/dlltest.cpp
Normal file
96
proto/junk/dlltest.cpp
Normal file
@@ -0,0 +1,96 @@
|
||||
#include <common/windows.hpp>
|
||||
#include <common/block.hpp>
|
||||
#include <common/systime.hpp>
|
||||
#include <common/filemap.hpp>
|
||||
#include <common/pview.hpp>
|
||||
#include <sgi_stl/map.h>
|
||||
|
||||
map<int,int> instanceData;
|
||||
|
||||
typedef struct tagTICKDATA
|
||||
{
|
||||
float tradePrice;
|
||||
float bidPrice;
|
||||
float askPrice;
|
||||
SYSTEMTIME systemTime;
|
||||
bool isTrade;
|
||||
}TICKDATA;
|
||||
|
||||
FileMap fileMap;
|
||||
|
||||
void createTickData(Block<TICKDATA> &tickData);
|
||||
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) bool PASCAL GetTicks(char *pTickers,SYSTEMTIME *pStartDate,SYSTEMTIME *pEndDate,char *pHandle);
|
||||
}
|
||||
|
||||
bool APIENTRY DllMain(HANDLE hModule,DWORD reason,LPVOID lpReserved)
|
||||
{
|
||||
switch(reason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
instanceData[(int)::GetCurrentThreadId]=int((int*)new FileMap());
|
||||
// MessageBox(0,"DLLTEST","DLL_THREAD_ATTACH",MB_OK);
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
// ::delete (FileMap*)instanceData[(int)::GetCurrentThreadId];
|
||||
// MessageBox(0,"DLLTEST","DLL_THREAD_DETACH",MB_OK);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool PASCAL GetTicks(char *pTickers,SYSTEMTIME *pStartDate,SYSTEMTIME *pEndDate,char *pDataHandle)
|
||||
{
|
||||
Block<TICKDATA> tickDataBlock;
|
||||
PureViewOfFile pureView;
|
||||
|
||||
// DebugBreak();
|
||||
FileMap *pFileMap=(FileMap*)instanceData[(int)::GetCurrentThreadId()];
|
||||
if(!pFileMap){pFileMap=new FileMap();instanceData[(int)::GetCurrentThreadId()]=(int)pFileMap;}
|
||||
String str=String(pTickers)+String(" ")+SystemTime(*pStartDate).toString()+String(" ")+SystemTime(*pEndDate).toString();
|
||||
// MessageBox(0,"GetTicks",str.str(),MB_OK);
|
||||
createTickData(tickDataBlock);
|
||||
::sprintf(pDataHandle,"%08lx%08lx",(int)GetCurrentProcessId(),(int)GetCurrentThreadId());
|
||||
if(!pFileMap->create((char*)pDataHandle,0,tickDataBlock.size()*sizeof(TICKDATA),FileMap::ReadWrite,FileMap::Commit))return false;
|
||||
pureView.createView(*pFileMap);
|
||||
pureView.write((int)sizeof(TICKDATA));
|
||||
pureView.write((int)tickDataBlock.size());
|
||||
for(int index=0;index<tickDataBlock.size();index++)
|
||||
{
|
||||
TICKDATA &tickData=tickDataBlock[index];
|
||||
pureView.write(tickData.tradePrice);
|
||||
pureView.write(tickData.bidPrice);
|
||||
pureView.write(tickData.askPrice);
|
||||
pureView.write((unsigned char*)&tickData.systemTime,sizeof(tickData.systemTime));
|
||||
pureView.write(tickData.isTrade);
|
||||
}
|
||||
pureView.destroyView();
|
||||
return true;
|
||||
}
|
||||
|
||||
void createTickData(Block<TICKDATA> &tickDataBlock)
|
||||
{
|
||||
tickDataBlock.remove();
|
||||
|
||||
tickDataBlock.insert(&TICKDATA());
|
||||
TICKDATA *pTickData=&tickDataBlock[tickDataBlock.size()-1];
|
||||
pTickData->tradePrice=100;
|
||||
pTickData->bidPrice=0;
|
||||
pTickData->askPrice=0;
|
||||
pTickData->systemTime=SystemTime(2003,5,1).getSYSTEMTIME();
|
||||
pTickData->isTrade=true;
|
||||
tickDataBlock.insert(&TICKDATA());
|
||||
pTickData=&tickDataBlock[tickDataBlock.size()-1];
|
||||
pTickData->tradePrice=0;
|
||||
pTickData->bidPrice=101.90;
|
||||
pTickData->askPrice=0;
|
||||
pTickData->systemTime=SystemTime(2003,5,1).getSYSTEMTIME();
|
||||
pTickData->isTrade=false;
|
||||
}
|
||||
|
||||
118
proto/junk/dlltest.dsp
Normal file
118
proto/junk/dlltest.dsp
Normal file
@@ -0,0 +1,118 @@
|
||||
# Microsoft Developer Studio Project File - Name="dlltest" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=dlltest - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "dlltest.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "dlltest.mak" CFG="dlltest - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "dlltest - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "dlltest - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/Risk/Utility/Sample/Sql", BBHAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "dlltest - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLLTEST_EXPORTS" /Yu"stdafx.h" /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLLTEST_EXPORTS" /Yu"stdafx.h" /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "dlltest - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "dlltest___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "dlltest___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "debug"
|
||||
# PROP Intermediate_Dir "debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLLTEST_EXPORTS" /Yu"stdafx.h" /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLLTEST_EXPORTS" /D "STRICT" /D "__FLAT__" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "dlltest - Win32 Release"
|
||||
# Name "dlltest - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dlltest.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dlltest.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdAfx.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ReadMe.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
52
proto/junk/dlltest.dsw
Normal file
52
proto/junk/dlltest.dsw
Normal file
@@ -0,0 +1,52 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=..\common\common.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Risk/Utility/Sample/Sql", BBHAAAAA
|
||||
.
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "dlltest"=.\dlltest.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
begin source code control
|
||||
"$/Risk/Utility/Sample/Sql", BBHAAAAA
|
||||
.
|
||||
end source code control
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
proto/junk/dlltest.opt
Normal file
BIN
proto/junk/dlltest.opt
Normal file
Binary file not shown.
33
proto/junk/dlltest.plg
Normal file
33
proto/junk/dlltest.plg
Normal file
@@ -0,0 +1,33 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: dlltest - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPE2.tmp" with contents
|
||||
[
|
||||
/nologo /MTd /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "DLLTEST_EXPORTS" /D "STRICT" /D "__FLAT__" /Fo"debug/" /Fd"debug/" /FD /GZ /c
|
||||
"D:\work\proto\dlltest.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPE2.tmp"
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPE3.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"debug/dlltest.pdb" /debug /machine:I386 /out:"debug/dlltest.dll" /implib:"debug/dlltest.lib" /pdbtype:sept
|
||||
.\debug\dlltest.obj
|
||||
\work\exe\mscommon.lib
|
||||
]
|
||||
Creating command line "link.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPE3.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
dlltest.cpp
|
||||
Linking...
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
dlltest.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
13
proto/junk/file2.cpp
Normal file
13
proto/junk/file2.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
extern int data;
|
||||
|
||||
void foo2()
|
||||
{
|
||||
data=2;
|
||||
}
|
||||
|
||||
*/
|
||||
BIN
proto/junk/foo.dat
Normal file
BIN
proto/junk/foo.dat
Normal file
Binary file not shown.
75
proto/junk/hookdll.cpp
Normal file
75
proto/junk/hookdll.cpp
Normal file
@@ -0,0 +1,75 @@
|
||||
#include <common/string.hpp>
|
||||
#include <common/stdio.hpp>
|
||||
#include <common/file.hpp>
|
||||
#include <common/console.hpp>
|
||||
#include <thread/mutex.hpp>
|
||||
#include <sgi_stl/map.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) bool FAR PASCAL unHook(void);
|
||||
__declspec(dllexport) bool FAR PASCAL setHook(void);
|
||||
}
|
||||
|
||||
LRESULT CALLBACK callWndHookProc(int nCode,WPARAM wParam,LPARAM lParam);
|
||||
void handleMessage(UINT message,HWND hwnd,WPARAM wParam,LPARAM lParam);
|
||||
|
||||
HHOOK smhHook=(HHOOK)0;
|
||||
File outFile("d:\log.txt","wb");
|
||||
HINSTANCE hModuleInst;
|
||||
|
||||
BOOL _stdcall DllMain(HINSTANCE hDLLInst,DWORD dwReason,LPVOID lpReserved)
|
||||
{
|
||||
switch(dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH :
|
||||
hModuleInst=hDLLInst;
|
||||
::printf("Process attach: 0x%08lx\n",hModuleInst);
|
||||
break;
|
||||
case DLL_PROCESS_DETACH :
|
||||
::printf("Process detach\n");
|
||||
break;
|
||||
case DLL_THREAD_ATTACH :
|
||||
::printf("Thread attach\n");
|
||||
break;
|
||||
case DLL_THREAD_DETACH :
|
||||
::printf("Thread detach\n");
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
bool FAR PASCAL setHook(void)
|
||||
{
|
||||
smhHook=::SetWindowsHookEx(WH_CALLWNDPROC,(HOOKPROC)&callWndHookProc,hModuleInst,0);
|
||||
return smhHook?true:false;
|
||||
}
|
||||
|
||||
bool FAR PASCAL unHook()
|
||||
{
|
||||
if(!smhHook)return false;
|
||||
::UnhookWindowsHookEx(smhHook);
|
||||
smhHook=0;
|
||||
return true;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK callWndHookProc(int nCode,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
LRESULT result=0;
|
||||
CWPSTRUCT *pCWPSTRUCT=(CWPSTRUCT*)lParam;
|
||||
printf("callWndHookProc\n");
|
||||
handleMessage(pCWPSTRUCT->message,pCWPSTRUCT->hwnd,pCWPSTRUCT->wParam,pCWPSTRUCT->lParam);
|
||||
if(nCode<0)return result=::CallNextHookEx(smhHook,nCode,wParam,lParam);
|
||||
return result;
|
||||
}
|
||||
|
||||
void handleMessage(UINT message,HWND hwnd,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
String outLine;
|
||||
outLine.reserve(256);
|
||||
::sprintf(outLine.str(),"MESSAGE:%ld HWND:0x%08lx WPARAM:%d LPARAM:%ld",message,hwnd,wParam,lParam);
|
||||
outFile.writeLine(outLine);
|
||||
outFile.flush();
|
||||
}
|
||||
304
proto/junk/main.cpp.saf
Normal file
304
proto/junk/main.cpp.saf
Normal file
@@ -0,0 +1,304 @@
|
||||
#include <common/file.hpp>
|
||||
#include <common/profile.hpp>
|
||||
#include <common/string.hpp>
|
||||
#include <common/block.hpp>
|
||||
#include <ClassGen/NameValuePair.hpp>
|
||||
|
||||
class ClassMapper
|
||||
{
|
||||
public:
|
||||
ClassMapper();
|
||||
virtual ~ClassMapper();
|
||||
bool createClass(const String &packageName,String className,const String &databaseName,const String &tableName,const String &strPathMapFile,const String &strPathTable);
|
||||
private:
|
||||
bool loadMapping(const String &strPathMapFile);
|
||||
bool mapType(const String &type,String &mapped);
|
||||
bool createClass(const String &packageName,const String &className,Block<NameValuePair> &variables);
|
||||
bool createDataAccess(const String &packageName,const String &className,const String &instanceName,const String &databaseName,const String &tableName,Block<NameValuePair> &variables,Block<NameValuePair> &originals);
|
||||
|
||||
String makeHungarian(const String &name);
|
||||
String makeAccessor(const String &name);
|
||||
String makeMutator(const String &name);
|
||||
String makeFirstUpper(const String &name);
|
||||
String makeFirstLower(const String &name);
|
||||
Block<NameValuePair> mNameValuePairs;
|
||||
};
|
||||
|
||||
ClassMapper::ClassMapper()
|
||||
{
|
||||
}
|
||||
|
||||
ClassMapper::~ClassMapper()
|
||||
{
|
||||
}
|
||||
|
||||
bool ClassMapper::createClass(const String &packageName,String className,const String &databaseName,const String &tableName,const String &strPathMapFile,const String &strPathTable)
|
||||
{
|
||||
File inFile;
|
||||
String strLine;
|
||||
String name;
|
||||
String value;
|
||||
String instanceName;
|
||||
Block<NameValuePair> variables;
|
||||
Block<NameValuePair> originals;
|
||||
int errors=0;
|
||||
|
||||
if(!loadMapping(strPathMapFile))return false;
|
||||
if(!inFile.open(strPathTable,"rb"))return false;
|
||||
while(true)
|
||||
{
|
||||
inFile.readLine(strLine);
|
||||
if(strLine.isNull())break;
|
||||
name=strLine.betweenString(0,' ');
|
||||
value=strLine.betweenString(' ',' ');
|
||||
if(!mapType(value,value))
|
||||
{
|
||||
printf("Don't know how to map %s\n",value.str());
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
variables.insert(&NameValuePair(makeHungarian(name),value));
|
||||
originals.insert(&NameValuePair(name,value));
|
||||
}
|
||||
inFile.close();
|
||||
if(errors)return false;
|
||||
if(!variables.size())return false;
|
||||
instanceName=makeFirstLower(className);
|
||||
className=makeFirstUpper(className);
|
||||
createClass(packageName,className,variables);
|
||||
createDataAccess(packageName,className,instanceName,databaseName,tableName,variables,originals);
|
||||
printf("generation completed.\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::createClass(const String &packageName,const String &className,Block<NameValuePair> &variables)
|
||||
{
|
||||
File outFile;
|
||||
|
||||
if(!outFile.open(className+String(".java"),"wb"))return false;
|
||||
if(!packageName.isNull())outFile.writeLine(String("package ")+packageName);
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine(String("public class ")+className);
|
||||
outFile.writeLine("{");
|
||||
for(int index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" private ")+nameValuePair.getValue()+String(" ")+nameValuePair.getName()+String(";"));
|
||||
}
|
||||
for(index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" public ")+nameValuePair.getValue()+String(" ")+makeAccessor(nameValuePair.getName())+String("()"));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" return ")+nameValuePair.getName()+String(";"));
|
||||
outFile.writeLine(" }");
|
||||
|
||||
outFile.writeLine(String(" public void ")+makeMutator(nameValuePair.getName())+String("(")+nameValuePair.getValue()+String(" ")+nameValuePair.getName()+String(")"));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" this.")+nameValuePair.getName()+String("=")+nameValuePair.getName()+String(";"));
|
||||
outFile.writeLine(" }");
|
||||
}
|
||||
outFile.writeLine("};");
|
||||
outFile.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::createDataAccess(const String &packageName,const String &className,const String &instanceName,const String &databaseName,const String &tableName,Block<NameValuePair> &variables,Block<NameValuePair> &originals)
|
||||
{
|
||||
File outFile;
|
||||
String select;
|
||||
|
||||
if(!outFile.open(className+String("DA")+String(".java"),"wb"))return false;
|
||||
if(!packageName.isNull())outFile.writeLine(String("package ")+packageName);
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
|
||||
outFile.writeLine(String("public class ")+className+String("DA"));
|
||||
outFile.writeLine("{");
|
||||
outFile.writeLine(" public List readAll()throws SQLException");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" Statement statement=null;");
|
||||
outFile.writeLine(" ResultSet rs=null;");
|
||||
outFile.writeLine(" Connection connection=null;");
|
||||
outFile.writeLine(" String strQuery=null;");
|
||||
outFile.writeLine(" List list=null;");
|
||||
outFile.writeLine("\t");
|
||||
|
||||
outFile.writeLine(" try");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" ")+className+String(" ")+instanceName+String(" = new ")+className+String("();"));
|
||||
outFile.writeLine(" connection=getConnection();");
|
||||
outFile.writeLine(" statement=connection.createStatement();");
|
||||
outFile.writeLine(" list=new ArrayList();");
|
||||
select=" strQuery=\"select ";
|
||||
for(int index=0;index<originals.size();index++)
|
||||
{
|
||||
select+=originals[index].getName();
|
||||
if(index<originals.size()-1)select+=String(", ");
|
||||
}
|
||||
select+=String(" from ")+tableName+String("\";");
|
||||
outFile.writeLine(select);
|
||||
outFile.writeLine(" rs=statement.executeQuery(strQuery);");
|
||||
outFile.writeLine(" while(rs.next())");
|
||||
outFile.writeLine(" {");
|
||||
for(index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &original=originals[index];
|
||||
NameValuePair &variable=variables[index];
|
||||
outFile.writeLine(String(" ")+instanceName+String(".")+makeMutator(variable.getName())+String("(rs.get")+makeFirstUpper(variable.getValue())+String("(\"")+original.getName()+String("\"));"));
|
||||
}
|
||||
outFile.writeLine(String(" list.add(")+instanceName+String(");"));
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" return list;");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" finally");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" if(null!=rs)rs.close();");
|
||||
outFile.writeLine(" if(null!=statement)statement.close();");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" }");
|
||||
|
||||
|
||||
outFile.writeLine(" private Connection getConnection()throws SQLException");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" try");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" InitialContext jndiCntx=new InitialContext();");
|
||||
outFile.writeLine(String(" DataSource ds=(DataSource)jndiCntx.lookup(\"java:") +databaseName+String("\")"));
|
||||
outFile.writeLine(" jndiCntx.close();");
|
||||
outFile.writeLine(" return ds.getConnection();");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" catch(NamingException exception)");
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(" message(\"[getConnection] Object not found\");");
|
||||
outFile.writeLine(" throw new EJBException(exception);");
|
||||
outFile.writeLine(" }");
|
||||
outFile.writeLine(" }");
|
||||
|
||||
outFile.writeLine("};");
|
||||
outFile.close();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ClassMapper::mapType(const String &type,String &mapped)
|
||||
{
|
||||
for(int index=0;index<mNameValuePairs.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=mNameValuePairs[index];
|
||||
if(nameValuePair.getName()==type)return mapped=nameValuePair.getValue(),true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ClassMapper::loadMapping(const String &strPathMapFile)
|
||||
{
|
||||
File inFile;
|
||||
String strLine;
|
||||
String key;
|
||||
String value;
|
||||
|
||||
mNameValuePairs.remove();
|
||||
if(!inFile.open(strPathMapFile,"rb"))return false;
|
||||
while(true)
|
||||
{
|
||||
inFile.readLine(strLine);
|
||||
if(strLine.isNull())break;
|
||||
key=strLine.betweenString(0,'=');
|
||||
value=strLine.betweenString('=',0);
|
||||
mNameValuePairs.insert(&NameValuePair(key,value));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
String ClassMapper::makeHungarian(const String &name)
|
||||
{
|
||||
String hungarianName;
|
||||
|
||||
int length=name.length();
|
||||
for(int index=0;index<length;index++)
|
||||
{
|
||||
char ch=name.charAt(index);
|
||||
if(ch=='_')
|
||||
{
|
||||
if(index+1>=length)break;
|
||||
index++;
|
||||
ch=toupper(name.charAt(index));
|
||||
hungarianName+=ch;
|
||||
}
|
||||
else hungarianName+=ch;
|
||||
}
|
||||
return hungarianName;
|
||||
}
|
||||
|
||||
String ClassMapper::makeAccessor(const String &name)
|
||||
{
|
||||
String str;
|
||||
|
||||
str+="get";
|
||||
str+=toupper(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
String ClassMapper::makeMutator(const String &name)
|
||||
{
|
||||
String str;
|
||||
|
||||
str+="set";
|
||||
str+=toupper(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
String ClassMapper::makeFirstUpper(const String &name)
|
||||
{
|
||||
String str;
|
||||
str+=toupper(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
String ClassMapper::makeFirstLower(const String &name)
|
||||
{
|
||||
String str;
|
||||
str+=tolower(name.charAt(0));
|
||||
str+=name.substr(1);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
#include <common/filemap.hpp>
|
||||
#include <common/pview.hpp>
|
||||
extern "C"
|
||||
{
|
||||
bool PASCAL GetTicks(char *pTickers,SYSTEMTIME *pStartDate,SYSTEMTIME *pEndDate,char *pHandle);
|
||||
}
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
SYSTEMTIME startTime;
|
||||
SYSTEMTIME endTime;
|
||||
char buffer[128];
|
||||
::memset(buffer,0,sizeof(buffer));
|
||||
GetTicks("IBM",&startTime,&endTime,buffer);
|
||||
FileMap fileMap;
|
||||
if(!fileMap.open(buffer,0,128))return 0;
|
||||
PureViewOfFile pureView(fileMap);
|
||||
int size(0);
|
||||
pureView.read(size);
|
||||
|
||||
|
||||
|
||||
if(7!=argc)
|
||||
{
|
||||
printf("USAGE: mapclass <packagename><classname><databasename><tablename><pathtomappingtable><pathtotable>\n");
|
||||
printf("(ie) mapclass zbi.risk.server.vhi.mapped Historic DRMS dt_main_positions c:\\work\\classgen\\mapping.txt c:\\work\\classgen\\table.txt\n");
|
||||
return 0;
|
||||
}
|
||||
ClassMapper classMapper;
|
||||
if(!classMapper.createClass(argv[1],argv[2],argv[3],argv[4],argv[5],argv[6]))return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
44
proto/junk/makeres.cpp
Normal file
44
proto/junk/makeres.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#include <common/string.hpp>
|
||||
#include <common/file.hpp>
|
||||
#include <common/openfile.hpp>
|
||||
|
||||
void main(int argc,char **argv)
|
||||
{
|
||||
String strLine;
|
||||
int startIndex=0;
|
||||
int currentIndex=0;
|
||||
int count=0;
|
||||
|
||||
if(3!=argc)
|
||||
{
|
||||
::printf("USAGE makeres <filename> <startindex>\n");
|
||||
::printf("(ie) makeres stringfile.txt 22000\n");
|
||||
return;
|
||||
}
|
||||
startIndex=String(argv[2]).toInt();
|
||||
File inFile(argv[1]);
|
||||
if(!inFile.isOkay())
|
||||
{
|
||||
printf("Error opening file.\n");
|
||||
return;
|
||||
}
|
||||
currentIndex=startIndex;
|
||||
printf("STRINGTABLE DISCARDABLE\n");
|
||||
printf("BEGIN\n");
|
||||
while(true)
|
||||
{
|
||||
if(!inFile.readLine(strLine))break;
|
||||
if(strLine.isNull())continue;
|
||||
printf(" STRING_%d %s\n",currentIndex++,strLine.str());
|
||||
count++;
|
||||
}
|
||||
printf("END\n");
|
||||
printf("******************************************************\n");
|
||||
currentIndex=startIndex;
|
||||
for(int index=0;index<count;index++)
|
||||
{
|
||||
printf("#define STRING_%d %d\n",currentIndex,currentIndex);
|
||||
currentIndex++;
|
||||
}
|
||||
printf("#define STRING_CHORD_END %d\n",currentIndex);
|
||||
}
|
||||
7
proto/junk/mapping.txt
Normal file
7
proto/junk/mapping.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
nvarchar=String
|
||||
decimal=float
|
||||
float=float
|
||||
varchar=String
|
||||
smalldatetime=Timestamp
|
||||
int=int
|
||||
bit=boolean
|
||||
41
proto/junk/mykernel.cpp
Normal file
41
proto/junk/mykernel.cpp
Normal file
@@ -0,0 +1,41 @@
|
||||
#include <common/windows.hpp>
|
||||
#include <common/file.hpp>
|
||||
|
||||
int processCount=0;
|
||||
File outFile;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllexport) FARPROC PASCAL GetProcAddress(HMODULE hModule,LPCSTR lpProcName);
|
||||
// __declspec(dllexport) HMODULE PASCAL GetModuleHandle(LPCTSTR lpModuleName);
|
||||
// __declspec(dllexport) HMODULE PASCAL LoadLibrary(LPCTSTR lpModuleName);
|
||||
}
|
||||
|
||||
BOOL WINAPI DLLMain(HINSTANCE hDLLInst,DWORD dwReason,LPVOID lpReserved)
|
||||
{
|
||||
switch(dwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH :
|
||||
if(!processCount)outFile.open("mykernel.log","wb");
|
||||
outFile.writeLine("Process attach");
|
||||
outFile.flush();
|
||||
processCount++;
|
||||
break;
|
||||
case DLL_PROCESS_DETACH :
|
||||
if(processCount)outFile.writeLine("Process detach");
|
||||
if(--processCount<=0)outFile.close();
|
||||
break;
|
||||
case DLL_THREAD_ATTACH :
|
||||
break;
|
||||
case DLL_THREAD_DETACH :
|
||||
break;
|
||||
default :
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//FARPROC PASCAL GetProcAddress(HMODULE hModule,LPCSTR lpProcName)
|
||||
//{
|
||||
// return 0;
|
||||
//}
|
||||
106
proto/junk/mykernel.dsp
Normal file
106
proto/junk/mykernel.dsp
Normal file
@@ -0,0 +1,106 @@
|
||||
# Microsoft Developer Studio Project File - Name="mykernel" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=mykernel - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mykernel.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mykernel.mak" CFG="mykernel - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "mykernel - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "mykernel - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mykernel - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYKERNEL_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYKERNEL_EXPORTS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "mykernel - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "mykernel___Win32_Debug"
|
||||
# PROP BASE Intermediate_Dir "mykernel___Win32_Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "msvcobj"
|
||||
# PROP Intermediate_Dir "msvcobj"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYKERNEL_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W1 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYKERNEL_EXPORTS" /D "STRICT" /D "__FLAT__" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "mykernel - Win32 Release"
|
||||
# Name "mykernel - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mykernel.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
44
proto/junk/mykernel.dsw
Normal file
44
proto/junk/mykernel.dsw
Normal file
@@ -0,0 +1,44 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "common"=..\common\common.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "mykernel"=.\mykernel.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name common
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
BIN
proto/junk/mykernel.ncb
Normal file
BIN
proto/junk/mykernel.ncb
Normal file
Binary file not shown.
BIN
proto/junk/mykernel.opt
Normal file
BIN
proto/junk/mykernel.opt
Normal file
Binary file not shown.
30
proto/junk/mykernel.plg
Normal file
30
proto/junk/mykernel.plg
Normal file
@@ -0,0 +1,30 @@
|
||||
<html>
|
||||
<body>
|
||||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: mykernel - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPE6.tmp" with contents
|
||||
[
|
||||
/nologo /MTd /W1 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "MYKERNEL_EXPORTS" /D "STRICT" /D "__FLAT__" /Fp"msvcobj/mykernel.pch" /YX /Fo"msvcobj/" /Fd"msvcobj/" /FD /GZ /c
|
||||
"D:\work\proto\mykernel.cpp"
|
||||
]
|
||||
Creating command line "cl.exe @C:\WINNT\Profiles\sean\LOCALS~1\Temp\RSPE6.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
mykernel.cpp
|
||||
D:\work\proto\mykernel.cpp(9) : error C2556: 'int __stdcall GetProcAddress(struct HINSTANCE__ *,const char *)' : overloaded function differs only by return type from 'int (__stdcall *__stdcall GetProcAddress(struct HINSTANCE__ *,const char *))(void)'
|
||||
d:\program files\microsoft visual studio\vc98\include\winbase.h(1108) : see declaration of 'GetProcAddress'
|
||||
D:\work\proto\mykernel.cpp(9) : error C2373: 'GetProcAddress' : redefinition; different type modifiers
|
||||
d:\program files\microsoft visual studio\vc98\include\winbase.h(1108) : see declaration of 'GetProcAddress'
|
||||
Error executing cl.exe.
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
mykernel.obj - 2 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
130
proto/junk/proto.001
Normal file
130
proto/junk/proto.001
Normal file
@@ -0,0 +1,130 @@
|
||||
# Microsoft Developer Studio Project File - Name="proto" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=proto - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "proto.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "proto.mak" CFG="proto - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "proto - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "proto - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "proto - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "proto - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\proto___"
|
||||
# PROP BASE Intermediate_Dir ".\proto___"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\msvcobj"
|
||||
# PROP Intermediate_Dir ".\msvcobj"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /Zp1 /MTd /GX /Z7 /Od /I "\work" /I "\parts" /I "\parts\sgi_stl" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "STRICT" /D "__FLAT__" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib comctl32.lib winmm.lib oleaut32.lib ole32.lib /nologo /subsystem:windows /pdb:none /debug /debugtype:both /machine:I386
|
||||
# SUBTRACT LINK32 /map
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "proto - Win32 Release"
|
||||
# Name "proto - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\main.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Paint.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\toolbar.bmp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\com.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\mscommon.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\psapint.lib
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\Exe\toolbar.lib
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
657
proto/junk/scraps.txt
Normal file
657
proto/junk/scraps.txt
Normal file
@@ -0,0 +1,657 @@
|
||||
/*
|
||||
class Comparator
|
||||
{
|
||||
public:
|
||||
bool operator()(const HWND hwnd1,const HWND hwnd2)const{return (int)hwnd1<(int)hwnd2;}
|
||||
};
|
||||
|
||||
typedef map<HWND,int,Comparator> WinMap;
|
||||
WinMap smWinMap;
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <common/windows.hpp>
|
||||
#include <common/library.hpp>
|
||||
#include <thread/event.hpp>
|
||||
|
||||
int messageLoop(void);
|
||||
void yield();
|
||||
|
||||
#include <hookproc/apientry.hpp>
|
||||
#include <hookproc/procaddr.hpp>
|
||||
|
||||
class CBTHook;
|
||||
typedef ProcAddress<CBTHook> CBTHookProc;
|
||||
//class CBTHook : protected APIEntry, private CBTHookProc
|
||||
class CBTHook : protected APIEntry, private CBTHookProc
|
||||
{
|
||||
public:
|
||||
typedef LRESULT (__stdcall *LPFNCBTPROC)(int nCode,WPARAM wParam,LPARAM lParam);
|
||||
CBTHook();
|
||||
virtual ~CBTHook();
|
||||
DWORD getHookAddress(void);
|
||||
protected:
|
||||
virtual LRESULT handleActive(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleClickSkipped(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleCreateWnd(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleDestroyWnd(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleKeySkipped(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleMinMax(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleMoveSize(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleQs(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleSetFocus(WPARAM wParam,LPARAM lParam);
|
||||
virtual LRESULT handleSysCommand(WPARAM wParam,LPARAM lParam);
|
||||
private:
|
||||
enum {ParamLength=12};
|
||||
CBTHook &operator=(const CBTHook &cbtHook);
|
||||
LRESULT entryProc(int nCode,WPARAM wParam,LPARAM lParam);
|
||||
|
||||
HHOOK mhHook;
|
||||
};
|
||||
|
||||
inline
|
||||
CBTHook::CBTHook(void)
|
||||
: APIEntry(ParamLength,(DWORD)this,getProcAddress((ProcAddress<CBTHook>::LPFNMETHODVOID)&CBTHook::entryProc)),
|
||||
mhHook(0)
|
||||
{
|
||||
HINSTANCE hProcessInstance=(HINSTANCE)::GetModuleHandle(0);
|
||||
mhHook=::SetWindowsHookEx(WH_CBT,(HOOKPROC)getHookAddress(),hProcessInstance,0);
|
||||
}
|
||||
|
||||
inline
|
||||
CBTHook::~CBTHook()
|
||||
{
|
||||
if(!mhHook)return;
|
||||
::UnhookWindowsHookEx(mhHook);
|
||||
}
|
||||
|
||||
inline
|
||||
CBTHook &CBTHook::operator=(const CBTHook &cbtHook)
|
||||
{ // no implementation
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline
|
||||
DWORD CBTHook::getHookAddress(void)
|
||||
{
|
||||
return codeBase();
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::entryProc(int nCode,WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
LRESULT result;
|
||||
::printf("[CBTHook::entryProc]\n");
|
||||
if(nCode<0)return result=::CallNextHookEx(mhHook,nCode,wParam,lParam);
|
||||
switch(nCode)
|
||||
{
|
||||
case HCBT_ACTIVATE :
|
||||
result=handleActive(wParam,lParam);
|
||||
break;
|
||||
case HCBT_CLICKSKIPPED :
|
||||
result=handleClickSkipped(wParam,lParam);
|
||||
break;
|
||||
case HCBT_CREATEWND :
|
||||
result=handleCreateWnd(wParam,lParam);
|
||||
break;
|
||||
case HCBT_DESTROYWND :
|
||||
result=handleDestroyWnd(wParam,lParam);
|
||||
break;
|
||||
case HCBT_KEYSKIPPED :
|
||||
result=handleKeySkipped(wParam,lParam);
|
||||
break;
|
||||
case HCBT_MINMAX :
|
||||
result=handleMinMax(wParam,lParam);
|
||||
break;
|
||||
case HCBT_MOVESIZE :
|
||||
result=handleMoveSize(wParam,lParam);
|
||||
break;
|
||||
case HCBT_QS :
|
||||
result=handleQs(wParam,lParam);
|
||||
break;
|
||||
case HCBT_SETFOCUS :
|
||||
result=handleSetFocus(wParam,lParam);
|
||||
break;
|
||||
case HCBT_SYSCOMMAND :
|
||||
result=handleSysCommand(wParam,lParam);
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// *** virtuals
|
||||
inline
|
||||
LRESULT CBTHook::handleActive(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleClickSkipped(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleCreateWnd(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleDestroyWnd(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleKeySkipped(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleMinMax(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleMoveSize(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleQs(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleSetFocus(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT CBTHook::handleSysCommand(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
|
||||
class WinCreateHook : public CBTHook
|
||||
{
|
||||
public:
|
||||
WinCreateHook();
|
||||
virtual ~WinCreateHook();
|
||||
protected:
|
||||
virtual LRESULT handleCreateWnd(WPARAM wParam,LPARAM lParam);
|
||||
private:
|
||||
};
|
||||
|
||||
inline
|
||||
WinCreateHook::WinCreateHook()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
WinCreateHook::~WinCreateHook()
|
||||
{
|
||||
}
|
||||
|
||||
inline
|
||||
LRESULT WinCreateHook::handleCreateWnd(WPARAM wParam,LPARAM lParam)
|
||||
{
|
||||
::printf("[WinCreateHook::handleCreateWnd]");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// *********************************************************************************************
|
||||
|
||||
extern "C"
|
||||
{
|
||||
__declspec(dllimport) bool FAR PASCAL unHook(void);
|
||||
__declspec(dllimport) bool FAR PASCAL setHook(void);
|
||||
}
|
||||
|
||||
void main(int argc,char **argv)
|
||||
{
|
||||
// Library library("cbtdll.dll");
|
||||
// HHOOK mhHook;
|
||||
|
||||
// mhHook=::SetWindowsHookEx(WH_CBT,(HOOKPROC)&cbtHookProc,0,0);
|
||||
// mhHook=::SetWindowsHookEx(WH_CBT,(HOOKPROC)&cbtHookProc,library.getInstance(),0);
|
||||
|
||||
/*
|
||||
if(!library.isOkay())
|
||||
{
|
||||
::printf("Library not found");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!library.procAddress("_cbtHookProc"))
|
||||
{
|
||||
::printf("Address not found");
|
||||
return;
|
||||
}
|
||||
|
||||
mhHook=::SetWindowsHookEx(WH_CBT,(HOOKPROC)library.procAddress("cbtHookProc"),library.getInstance(),0);
|
||||
*/
|
||||
|
||||
if(!setHook())return;
|
||||
for(int index=0;index<120;index++)
|
||||
{
|
||||
yield();
|
||||
::Sleep(250);
|
||||
}
|
||||
unHook();
|
||||
|
||||
|
||||
// HINSTANCE hProcessInstance=(HINSTANCE)::GetModuleHandle(0);
|
||||
// ::printf("main hInst=0x%08lx",hProcessInstance);
|
||||
|
||||
// cbtHookProc(0,0,0);
|
||||
|
||||
/*
|
||||
// Event event;
|
||||
CBTHook cbtHook;
|
||||
for(;;)
|
||||
{
|
||||
yield();
|
||||
::Sleep(250);
|
||||
}
|
||||
// messageLoop();
|
||||
// event.waitEvent();
|
||||
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
int messageLoop(void)
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
while(::GetMessage(&msg,NULL,0,0))
|
||||
{
|
||||
::TranslateMessage(&msg);
|
||||
::DispatchMessage(&msg);
|
||||
}
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
void yield()
|
||||
{
|
||||
MSG msg;
|
||||
|
||||
if(::PeekMessage(&msg,0,0,0,PM_REMOVE))
|
||||
{
|
||||
::TranslateMessage(&msg);
|
||||
::DispatchMessage(&msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
File inFile;
|
||||
File outFile;
|
||||
String strLine;
|
||||
String midiLine;
|
||||
String saveLine;
|
||||
String www;
|
||||
|
||||
www="www.burksstudios.com";
|
||||
if(!inFile.open("d:\\midi.txt","rb"))return false;
|
||||
outFile.open("d:\\getpage.txt","wb");
|
||||
while(inFile.readLine(strLine))
|
||||
{
|
||||
midiLine=strLine.betweenString('"','"');
|
||||
if(midiLine.isNull())continue;
|
||||
Profile::makeFileName(midiLine,saveLine);
|
||||
outFile.writeLine(www+String(" ")+String("http://")+www+String("/jazz/")+midiLine+String(" d:\\")+saveLine);
|
||||
}
|
||||
return 1;
|
||||
|
||||
|
||||
/*
|
||||
|
||||
#include <midiseq/midiout.hpp>
|
||||
#include <midiseq/noteon.hpp>
|
||||
#include <midiseq/ProgramChange.hpp>
|
||||
|
||||
void main(int argc,char **argv)
|
||||
{
|
||||
|
||||
|
||||
|
||||
MIDIOutputDevice midiOut;
|
||||
NoteOn noteOn(PureNote(65,70));
|
||||
|
||||
if(!midiOut.openDevice())return;
|
||||
for(int prog=0;prog<128;prog++)
|
||||
{
|
||||
midiOut.midiEvent(ProgramChange(prog).getEvent(0,16));
|
||||
PureEvent &midiEvent=noteOn.getEvent();
|
||||
midiOut.midiEvent(midiEvent);
|
||||
::Sleep(250);
|
||||
}
|
||||
|
||||
// PureEvent getEvent(BYTE deltaTime=0,BYTE channel=0)const;
|
||||
// PureEvent(BYTE eventType,DWORD deltaTime,BYTE channel,BYTE firstData,BYTE secondData,DWORD tempo=0);
|
||||
|
||||
|
||||
midiOut.closeDevice();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
*/
|
||||
/*
|
||||
35 Acoustic Bass Drum 59 Ride Cymbal 2
|
||||
36 Bass Drum 1 60 Hi Bongo
|
||||
37 Side Stick 61 Low Bongo
|
||||
38 Acoustic Snare 62 Mute Hi Conga
|
||||
39 Hand Clap 63 Open Hi Conga
|
||||
40 Electric Snare 64 Low Conga
|
||||
41 Low Floor Tom 65 High Timbale
|
||||
42 Closed Hi-Hat 66 Low Timbale
|
||||
43 High Floor Tom 67 High Agogo
|
||||
44 Pedal Hi-Hat 68 Low Agogo
|
||||
45 Low Tom 69 Cabasa
|
||||
46 Open Hi-Hat 70 Maracas
|
||||
47 Low-Mid Tom 71 Short Whistle
|
||||
48 Hi-Mid Tom 72 Long Whistle
|
||||
49 Crash Cymbal 1 73 Short Guiro
|
||||
50 High Tom 74 Long Guiro
|
||||
51 Ride Cymbal 1 75 Claves
|
||||
52 Chinese Cymbal 76 Hi Wood Block
|
||||
53 Ride Bell 77 Low Wood Block
|
||||
54 Tambourine 78 Mute Cuica
|
||||
55 Splash Cymbal 79 Open Cuica
|
||||
56 Cowbell 80 Mute Triangle
|
||||
57 Crash Cymbal 2 81 Open Triangle
|
||||
58 Vibraslap
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
bool ClassMapper::createClass(const String &packageName,const String &className,const String &strPathMapFile,const String &strPathTable)
|
||||
{
|
||||
File inFile;
|
||||
File outFile;
|
||||
String strLine;
|
||||
String name;
|
||||
String value;
|
||||
String methodName;
|
||||
Block<NameValuePair> variables;
|
||||
int errors=0;
|
||||
|
||||
if(!loadMapping(strPathMapFile))return false;
|
||||
if(!inFile.open(strPathTable,"rb"))return false;
|
||||
while(true)
|
||||
{
|
||||
inFile.readLine(strLine);
|
||||
if(strLine.isNull())break;
|
||||
name=strLine.betweenString(' ',' ');
|
||||
name=makeHungarian(name);
|
||||
value=strLine.betweenString(' ',0).betweenString(' ',' ');
|
||||
if(!mapType(value,value))
|
||||
{
|
||||
printf("Don't know how to map %s\n",value.str());
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
variables.insert(&NameValuePair(name,value));
|
||||
}
|
||||
inFile.close();
|
||||
if(errors)return false;
|
||||
if(!variables.size())return false;
|
||||
if(!outFile.open(className+String(".java"),"wb"))return false;
|
||||
if(!packageName.isNull())outFile.writeLine(String("package ")+packageName);
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine(String("public class ")+className);
|
||||
outFile.writeLine("{");
|
||||
for(int index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" private ")+nameValuePair.getValue()+String(" ")+nameValuePair.getName()+String(";"));
|
||||
}
|
||||
for(index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &nameValuePair=variables[index];
|
||||
outFile.writeLine(String(" public ")+nameValuePair.getValue()+String(" ")+makeAccessor(nameValuePair.getName())+String("()"));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" return ")+nameValuePair.getName()+String(";"));
|
||||
outFile.writeLine(" }");
|
||||
|
||||
outFile.writeLine(String(" public void ")+makeMutator(nameValuePair.getName())+String("(")+nameValuePair.getValue()+String(" ")+nameValuePair.getName()+String(")"));
|
||||
outFile.writeLine(" {");
|
||||
outFile.writeLine(String(" this.")+nameValuePair.getName()+String("=")+nameValuePair.getName()+String(";"));
|
||||
outFile.writeLine(" }");
|
||||
}
|
||||
outFile.writeLine("};");
|
||||
outFile.close();
|
||||
printf("class generation completed with %d errors\n",errors);
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
bool ClassMapper::createResultClass(const String &packageName,const String &className,const String &instanceName,const String &strPathMapFile,const String &strPathTable)
|
||||
{
|
||||
File inFile;
|
||||
File outFile;
|
||||
String strLine;
|
||||
String name;
|
||||
String value;
|
||||
String methodName;
|
||||
Block<NameValuePair> variables;
|
||||
Block<NameValuePair> originals;
|
||||
int errors=0;
|
||||
|
||||
if(!loadMapping(strPathMapFile))return false;
|
||||
if(!inFile.open(strPathTable,"rb"))return false;
|
||||
while(true)
|
||||
{
|
||||
inFile.readLine(strLine);
|
||||
if(strLine.isNull())break;
|
||||
name=strLine.betweenString(' ',' ');
|
||||
value=strLine.betweenString(' ',0).betweenString(' ',' ');
|
||||
if(!mapType(value,value))
|
||||
{
|
||||
printf("Don't know how to map %s\n",value.str());
|
||||
errors++;
|
||||
continue;
|
||||
}
|
||||
variables.insert(&NameValuePair(makeHungarian(name),value));
|
||||
originals.insert(&NameValuePair(name,value));
|
||||
}
|
||||
inFile.close();
|
||||
if(errors)return false;
|
||||
if(!variables.size())return false;
|
||||
if(!outFile.open(className+String("RS")+String(".java"),"wb"))return false;
|
||||
if(!packageName.isNull())outFile.writeLine(String("package ")+packageName);
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("\t");
|
||||
outFile.writeLine("public void processResult()");
|
||||
outFile.writeLine("{");
|
||||
outFile.writeLine(String(" ")+className+String(" ")+instanceName+String(";"));
|
||||
outFile.writeLine(" ResultSet rs;");
|
||||
outFile.writeLine("// fill in the blanks");
|
||||
for(int index=0;index<variables.size();index++)
|
||||
{
|
||||
NameValuePair &original=originals[index];
|
||||
NameValuePair &variable=variables[index];
|
||||
outFile.writeLine(String(" ")+instanceName+String(".")+makeMutator(variable.getName())+String("(rs.get")+makeFirstUpper(variable.getValue())+String("(\"")+original.getName()+String("\"));"));
|
||||
}
|
||||
outFile.writeLine("}");
|
||||
outFile.close();
|
||||
printf("result set mapping completed with %d errors\n",errors);
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ProcessAPI processAPI;
|
||||
ProcessInfoList processInfoList;
|
||||
|
||||
processAPI.enumProcesses(processInfoList);
|
||||
for(int index=0;index<processInfoList.size();index++)
|
||||
{
|
||||
ProcessInfo &processInfo=processInfoList[index];
|
||||
::OutputDebugString(String(String("ProcessID:")+processInfo.processID().toString()+String("\n")).str());
|
||||
ModuleInfoList &moduleInfoList=processInfo;
|
||||
for(int modIndex=0;modIndex<moduleInfoList.size();modIndex++)
|
||||
{
|
||||
if(!modIndex)::OutputDebugString(String(moduleInfoList[modIndex].moduleFileName()+String("\n")).str());
|
||||
else ::OutputDebugString(String(String(" ")+moduleInfoList[modIndex].moduleFileName()+String("\n")).str());
|
||||
}
|
||||
::OutputDebugString("************************************************\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include <common/file.hpp>
|
||||
#include <common/library.hpp>
|
||||
#include <common/filetime.hpp>
|
||||
#include <common/systime.hpp>
|
||||
#include <common/process.hpp>
|
||||
#include <common/pview.hpp>
|
||||
#include <common/filemap.hpp>
|
||||
#include <common/openfile.hpp>
|
||||
#include <image/pehdr.hpp>
|
||||
#include <psapint/psapi.hpp>
|
||||
|
||||
void displayMemory();
|
||||
void displayProcesses();
|
||||
void showModule(const String &pathFileName);
|
||||
void showVersionInfo(const ModuleInfo &moduleInfo,String &moduleBaseName,String &moduleFileName);
|
||||
void displayAutoRuns();
|
||||
|
||||
int main(int argc,char **argv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void displayAutoRuns()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void displayProcesses()
|
||||
{
|
||||
ProcessIDList processIDList;
|
||||
ProcessAPI processAPI;
|
||||
ModuleInfoList moduleInfoList;
|
||||
|
||||
processAPI.enumProcesses(processIDList);
|
||||
for(int index=0;index<processIDList.size();index++)
|
||||
{
|
||||
const ProcessID &processID=processIDList[index];
|
||||
processAPI.enumProcessModules(processID,moduleInfoList);
|
||||
for(int modIndex=0;modIndex<moduleInfoList.size();modIndex++)
|
||||
{
|
||||
String moduleBaseName;
|
||||
String moduleFileName;
|
||||
const ModuleInfo &moduleInfo=moduleInfoList[modIndex];
|
||||
processAPI.getModuleBaseName(processID,moduleInfo.module(),moduleBaseName);
|
||||
processAPI.getModuleFileName(processID,moduleInfo.module(),moduleFileName);
|
||||
if(!modIndex)printf("Pid:%s\t%s\t\t%s\n",processID.toString().str(),moduleBaseName.str(),moduleFileName.str());
|
||||
else printf("\t\t\t%s\t\t%s\n",moduleBaseName.str(),moduleFileName.str());
|
||||
showVersionInfo(moduleInfo,moduleBaseName,moduleFileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void showVersionInfo(const ModuleInfo &moduleInfo,String &moduleBaseName,String &moduleFileName)
|
||||
{
|
||||
HGLOBAL hGlobal;
|
||||
|
||||
if(moduleBaseName.isNull()&&moduleFileName.isNull())
|
||||
{
|
||||
printf("Cannot open module :0x%08lx\n",moduleInfo.module());
|
||||
return;
|
||||
}
|
||||
HRSRC hRsrc=::FindResource(moduleInfo.module(),"VERSION",RT_VERSION);
|
||||
if(!hRsrc)
|
||||
{
|
||||
printf("Module 0x%08lx does not contain version information\n",moduleInfo.module());
|
||||
return;
|
||||
}
|
||||
hGlobal=::LoadResource(moduleInfo.module(),hRsrc);
|
||||
}
|
||||
|
||||
void showModule(const String &moduleFileName)
|
||||
{
|
||||
PEHeader peHeader;
|
||||
Block<ImageImportDescriptor> imageImportDescriptors;
|
||||
ImageSectionHeader imageSectionHeader;
|
||||
FileHandle inFile(moduleFileName,FileHandle::Read);
|
||||
if(!inFile.isOkay())return;
|
||||
FileMap inMap(inFile);
|
||||
PureViewOfFile view(inMap);
|
||||
peHeader<<view;
|
||||
ImageSectionHeaders &imageSectionHeaders=(ImageSectionHeaders&)peHeader;
|
||||
for(int index=0;index<imageSectionHeaders.size();index++)
|
||||
{
|
||||
printf("\t\t\t\t%s\n",imageSectionHeaders[index].name().str());
|
||||
}
|
||||
// peHeader.loadImageImportDescriptors(imageImportDescriptors,imageSectionHeader,view);
|
||||
}
|
||||
|
||||
void displayMemory()
|
||||
{
|
||||
MEMORYSTATUS memoryStatus;
|
||||
HANDLE hCurrentProcess(::GetCurrentProcess());
|
||||
FILETIME ftCreationTime;
|
||||
FILETIME ftExitTime;
|
||||
FILETIME ftKernelTime;
|
||||
FILETIME ftUserTime;
|
||||
SystemTime creationTime;
|
||||
SystemTime exitTime;
|
||||
SystemTime kernelTime;
|
||||
SystemTime userTime;
|
||||
|
||||
|
||||
::memset(&memoryStatus,0,sizeof(MEMORYSTATUS));
|
||||
memoryStatus.dwLength=sizeof(MEMORYSTATUS);
|
||||
::GlobalMemoryStatus(&memoryStatus);
|
||||
::printf("Memory Status\n");
|
||||
::printf("-------------\n");
|
||||
::printf("Percent In Use:%ld\n",memoryStatus.dwMemoryLoad);
|
||||
::printf("Physical Memory:%ld\n",memoryStatus.dwTotalPhys);
|
||||
::printf("Physical Available:%ld\n",memoryStatus.dwAvailPhys);
|
||||
::printf("Page File Size:%ld (bytes)\n",memoryStatus.dwAvailPageFile);
|
||||
::printf("Total Virtual:%ld (bytes)\n",memoryStatus.dwTotalVirtual);
|
||||
::printf("Available Virtual:%ld (bytes)\n",memoryStatus.dwAvailVirtual);
|
||||
::GetProcessTimes(hCurrentProcess,&ftCreationTime,&ftExitTime,&ftKernelTime,&ftUserTime);
|
||||
creationTime=FileTime(ftCreationTime);
|
||||
exitTime=FileTime(ftExitTime);
|
||||
kernelTime=FileTime(ftKernelTime);
|
||||
userTime=FileTime(ftUserTime);
|
||||
::printf("Process Times\n");
|
||||
::printf("Creation Time:%s\n",creationTime.toString().str());
|
||||
::printf("Exit Time:%s\n",exitTime.toString().str());
|
||||
::printf("Kernel Time:%02d:%02d:%02d.%03d\n",kernelTime.hour(),kernelTime.minute(),kernelTime.second(),kernelTime.milliseconds());
|
||||
::printf("User Time:%02d:%02d:%02d.%03d\n",userTime.hour(),userTime.minute(),userTime.second(),userTime.milliseconds());
|
||||
::printf("\n");
|
||||
}
|
||||
|
||||
|
||||
105
proto/junk/table.txt
Normal file
105
proto/junk/table.txt
Normal file
@@ -0,0 +1,105 @@
|
||||
trade_date smalldatetime 4 0
|
||||
trade_date_txt varchar 10 1
|
||||
portfolio varchar 35 0
|
||||
sub_portfolio varchar 35 0
|
||||
ticker varchar 25 0
|
||||
ticker_desc varchar 60 1
|
||||
uticker varchar 25 1
|
||||
instrument varchar 3 0
|
||||
mkt_cap decimal 13 1
|
||||
wgt_ave decimal 9 1
|
||||
volume decimal 13 1
|
||||
contract_size decimal 9 1
|
||||
hedge_index varchar 4 1
|
||||
hedge_sector varchar 4 1
|
||||
area varchar 6 1
|
||||
area_sector varchar 6 1
|
||||
[close] decimal 9 1
|
||||
y_close decimal 9 1
|
||||
uticker_close decimal 9 1
|
||||
y_uticker_close decimal 9 1
|
||||
delta decimal 9 1
|
||||
y_delta decimal 9 1
|
||||
days_expire int 4 1
|
||||
strike_price decimal 9 1
|
||||
hedge_beta decimal 5 1
|
||||
area_beta decimal 5 1
|
||||
sector_beta decimal 5 1
|
||||
group_beta decimal 5 1
|
||||
qty decimal 9 0
|
||||
y_qty decimal 9 0
|
||||
qty_change decimal 9 1
|
||||
hedge_close decimal 9 1
|
||||
hedge_perc decimal 9 1
|
||||
area_close decimal 9 1
|
||||
area_perc decimal 9 1
|
||||
sector_close decimal 9 1
|
||||
sector_perc decimal 9 1
|
||||
mkt_value decimal 13 1
|
||||
y_mkt_value decimal 13 1
|
||||
pnl decimal 13 1
|
||||
exposure decimal 13 1
|
||||
y_exposure decimal 13 1
|
||||
hb_exposure decimal 13 1
|
||||
y_hb_exposure decimal 13 1
|
||||
ab_exposure decimal 13 1
|
||||
y_ab_exposure decimal 13 1
|
||||
sb_exposure decimal 13 1
|
||||
y_sb_exposure decimal 13 1
|
||||
area_pnl_amt decimal 13 1
|
||||
sector_pnl_amt decimal 13 1
|
||||
pnl_perc decimal 13 1
|
||||
price_change decimal 13 1
|
||||
price_change_perc decimal 13 1
|
||||
price_change_amt decimal 13 1
|
||||
sector_alpha_perc decimal 13 1
|
||||
group_alpha_perc decimal 13 1
|
||||
area_alpha_perc decimal 13 1
|
||||
sector_alpha_amt decimal 13 1
|
||||
group_alpha_amt decimal 13 1
|
||||
area_alpha_amt decimal 13 1
|
||||
ab_return_amt decimal 13 1
|
||||
ab_return_perc decimal 13 1
|
||||
intraday_perc decimal 13 1
|
||||
intraday_amt decimal 13 1
|
||||
optionality_amt decimal 13 1
|
||||
optionality_perc decimal 13 1
|
||||
currency varchar 5 1
|
||||
base_close decimal 9 1
|
||||
y_base_close decimal 9 1
|
||||
fx_perc decimal 9 1
|
||||
fx_amt decimal 9 1
|
||||
fx_rate decimal 9 1
|
||||
y_fx_rate decimal 9 1
|
||||
alt_index_return_perc decimal 13 1
|
||||
alt_index_return_amt decimal 13 1
|
||||
index_beta_adj_perc decimal 13 1
|
||||
index_beta_adj_amt decimal 13 1
|
||||
vwap decimal 13 1
|
||||
vwap_pnl decimal 13 1
|
||||
hedge_alpha_amt decimal 13 1
|
||||
exposure_view varchar 5 1
|
||||
market_view varchar 5 1
|
||||
call_put varchar 4 1
|
||||
[month] varchar 4 1
|
||||
private bit 1 1
|
||||
ipo bit 1 1
|
||||
ratio decimal 9 1
|
||||
source varchar 10 1
|
||||
go_around smalldatetime 4 1
|
||||
adh decimal 13 1
|
||||
aac decimal 13 1
|
||||
azap float 8 1
|
||||
exported bit 1 1
|
||||
hedge_alpha_perc decimal 13 1
|
||||
alpha_go_around decimal 13 1
|
||||
alpha_real decimal 13 1
|
||||
alpha_unreal decimal 13 1
|
||||
pnl_real decimal 13 1
|
||||
pnl_unreal decimal 13 1
|
||||
cash_flow decimal 13 1
|
||||
beta_cash_flow decimal 13 1
|
||||
last_trade_date smalldatetime 4 1
|
||||
last_trade_qty decimal 9 1
|
||||
enterprise_value decimal 13 1
|
||||
associate nvarchar 30 1
|
||||
Reference in New Issue
Block a user